java - Spring Data Repository (JPA) - findByXXX using entity relation -


a schedule entity has 1 one relationship market entity other "simple" properties.

here schedulerepository:

@repositoryrestresource(path = "schedule") public interface schedulerepository extends jparepository<schedule, long> {     collection<schedule> findbymarket(market market); } 

"findbymarket" method works fine when invoking method programmatically. however, when invoking directly web application (http://localhost:8080/schedule/search/findbymarket), request type must get.

my question how pass market json object using get? using post wouldn't issues findxxx methods must use get. tried passing like:

?market={marketid:60} 

in querystring no avail.

not knowing controller looks like, assume if wanted pass marketid on like.

?marketid=60

and method like. method use handle converting , json.

@get @path("/query") @produces({"application/xml", "application/json"}) public todo whatevernameyoulike(@pathparam("marketid") string marketid) 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -