sql « Property « JPA Q&A





1. multiple sql statements generated due to property-ref    forum.hibernate.org

(This is similar to my question http://forum.hibernate.org/viewtopic.ph ... highlight= which was successfully answered. The difference here is that the association that's resulting in multiple SQL statements being generated is mapped using a property-ref attribute, and the solution to the question mentioned above does not seem to work in this case.) Anyhow, here the problem: I have a class called Po, a ...

2. Using property name with a SQL scalar function    forum.hibernate.org

I am using Hibernat 3.1.3 with MySQL 5.0.19. I have a class ChangeHistory that has a property actionTime of type timestamp. I want to use the Criteria facility to add an equality restriction on actionTime for a Date (not Timestamp). The native SQL would be: select * from change_history where date(action_time) = '2005-11-30'. How do I express this using the Criteria ...

3. Incorrect SQL Syntax when projecting collection properties    forum.hibernate.org

Newbie Joined: Tue Aug 14, 2007 8:03 pm Posts: 1 Incorrect SQL syntax is getting generated when trying to project collection properties. for e.g. the following HQL:HQL1 Select Sel__0.name as ActivityName, Sel__0.program as Schedule, Sel__0.category as Level from com.informatica.repository.testmodels.colony.Activity as Sel__0 (NOTE: in the above HQL1 'name' is a primitive property, 'program' is a collection of type 'Schedule' and 'category' is ...