This content has been marked as final.
Show 5 replies
-
1. Re: Accessing the dicriminator column
mikado82 May 4, 2006 3:40 PM (in response to mikado82)To make it clearer, I would like to have a query like this:
"from SomeEntityBean b WHERE b.parent.discriminatorColumn = :discriminatorValue" -
2. Re: Accessing the dicriminator column
rbenko Jun 9, 2006 4:57 PM (in response to mikado82)I'm also looking for this functionality - anyone???
-
3. Re: Accessing the dicriminator column
tefron Jun 9, 2006 5:35 PM (in response to mikado82)assuming that you mean with hibernate...
You can add a read-only property to your hbm mapping file with the column attribute set to the same name as the discriminator column.
e.g.
good luck. -
4. Re: Accessing the dicriminator column
rbenko Jun 11, 2006 12:41 PM (in response to mikado82)Yes, I actually figured out this rather simple (and obvious!) workaround just after I posted - thanks for the info.
-
5. Re: Accessing the dicriminator column
tefron Jun 12, 2006 9:44 AM (in response to mikado82)In most cases you don't need this property, all you have to do is "find-select" on the sub-class. We needed to use it when we had a collectioin of parent class objects that contain mix of sub-classes items and we needed to select objects of one sub-class.