1

I have a Spring boot application. I need a feature to dynamically query the stored procedure. What I mean by dynamically,

@NamedNativeQuery(name = "getCustomFoo", query = "select * from SP_FOO_CUSTOM where id = 1", resultClass = Foo.class)

but id could be any attribute in result set, so it could change based on the users input;

@NamedNativeQuery(name = "getCustomFoo", query = "select * from SP_FOO_CUSTOM where fooid = 1 ", resultClass = Foo.class)

Is it possible to do something like this? or this is totally out of standards?

gfg007
  • 171
  • 8

0 Answers0