Joined: Thu Jul 18, 2013 5:33 am Posts: 4
|
We need to associate a parent/child using 4 fields (composite) of which one of the fields can be null (conditionally). Per the table design/business we cannot introduce any constraints. These tables are in staging and we want to run an ETL and put in to working tables.
Tried to model parent/child using <bag> with the four fields but the hibernate generated select query for fetching child results in <nullablefield> = ? which fails to retrieve records as NULL cannot be compared.
Kept <nullablefield> out of composite properties, and thought of keeping the <nullablefield> condition in the "where" attribute of <bag> but looks like this cannot be dynamic SQL query (I may be wrong)
Is there any way to model this?
|
|