Modify

Ticket #407 (new enhancement)

Opened 17 months ago

Last modified 16 months ago

kauri-dbresouces-sample

Reported by: karel Owned by: jgou
Priority: minor Milestone: 0.5
Component: modules/kauri-dbresources Version:
Keywords: Cc:

Description

(reported by sdm+svr)
List the current limitations of this module (see: http://www.kauriproject.org/docs-0_4/183-
kauri/308-kauri.html). Unable to do stuff like: find persons in city Ghent
(http://localhost:8888/data/person?q.address.city=gent&media=xml)

Attachments

Change History

comment:1 Changed 16 months ago by karel

  • Milestone changed from 0.4 to 0.5

Moved to 0.5

More difficult than it seems. You need to know the type of the property that you want to filter on, and you can only find that out via introspection since JPA 1 doesn't provide an API to inspect the mapping metadata. Possible ways round this:

  • Use knowledge about the persistence-unit (not very clean)
  • Inspect the JPA annotations, but even then you need information about how the persistence unit is configured.
  • Perhaps JPA 2 lets you know more about the mapping. In any case, using the Criteria might make things easier.
  • Ugly hack: use a 1-result query to find out the class of the entities returned by your query, then use BeanUtils/PropertyUtils/PropertyDescriptors? to find out the type of the parameters.
View

Add a comment

Modify Ticket

Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.