I'm getting some pretty weird behavior with component. Here's my mapping:
<joined-subclass name="org.pharmgen.db.DbPcrAssay" table="PcrAssayView">
<key column="experimentAssayId" />
<component name="forwardPrimer" class="org.pharmgen.db.DbPcrPrimer">
<component name="annealingRegionInPrimer" class="org.pharmgen.db.DbRegion">
<property name="startPosition" column="fwdPrimerAnnealStart_prime" />
<property name="stopPosition" column="fwdPrimerAnnealStop_prime" />
</component>
<component name="annealingRegionInReferenceSequence" class="org.pharmgen.db.DbRegion">
<property name="startPosition" column="fwdPrimerAnnealStart_coord" />
<property name="stopPosition" column="fwdPrimerAnnealStop_coord" />
</component>
<property name="sequence" column="fwdPrimerDna" />
</component>
<component name="reversePrimer" class="org.pharmgen.db.DbPcrPrimer">
<component name="annealingRegionInPrimer" class="org.pharmgen.db.DbRegion">
<property name="startPosition" column="revPrimerAnnealStart_prime" />
<property name="stopPosition" column="revPrimerAnnealStop_prime" />
</component>
<component name="annealingRegionInReferenceSequence" class="org.pharmgen.db.DbRegion">
<property name="startPosition" column="revPrimerAnnealStart_coord" />
<property name="stopPosition" column="revPrimerAnnealStop_coord" />
</component>
<property name="sequence" column="revPrimerDna" />
</component>
</joined-subclass>
The problem is this: after getting a DbPcrAssay from Hibernate, the values of DbPcrAssay.forwardPrimer.annealingRegionInPrimer.startPosition and DbPcrAssay.reversePrimer.annealingRegionInPrimer.startPosition is the same, eventhough the values is different in the db. I suspect that Hibernate is getting confused over the fact that both DbRegion's are being assigned to the same name, eventhough they're in different parent objects. I haven't really taken a look at the Hibernate code though, so I'm not too sure.
Anyone else using <component> like this and noticing this kind of behavior?
-Mark
-------------------------------------------------------
This SF.NET email is sponsored by: A Thawte Code Signing Certificate is essential in establishing user confidence by providing assurance of authenticity and code integrity. Download our Free Code Signing guide:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel
- Re: [Hibernate] Possible bug with <component> Mark Woon
- Re: [Hibernate] Possible bug with <component> Gavin . King
- Re: [Hibernate] Possible bug with <component> Gavin . King