This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
i am using Hibernate Criteria with "Query by Example" and have some problems when i set "nullable=false" for OneToMany mapping inside my entities.
The problem is, that the generated SQL query is not the one i expected.
Here is my example code:
SQL Query generated by Hibernate:
As you can see, Hibernate inserts "personenst1_.bp_personenid=?" inside the sql-where-clause, cause personenStichworte in Person.java is mapped with "nullable=false". How can i force Hibernate to exclude this property without
changing nullable to true? (I have already tested Example.create(personenStichwort).excludeProperty("bp_personenid"), but doesn't work as well)