-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: parent/child, legacy composite data (conditional NULL val)
PostPosted: Sun Sep 29, 2013 4:10 am 
Newbie

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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.