0

I want to know how do we pass a query in spring JPA that has been prepared dynamically while program execution. The required query may vary according to the user input. So after framing the query manually using a for loop how do i execute this query ?

I have tried executing the query using the JDBC concept. but i want something more like :

@Query ( query_String)
public <return_type> filterNodes(String query_String);

Is this possible ?

Afridi
  • 6,134
  • 2
  • 17
  • 26

1 Answers1

1

The approach you sketched does not work.

Depending on how you create the query there are various options that might fit the bill:

Jens Schauder
  • 70,783
  • 26
  • 162
  • 317