Beginner |
|
Joined: Wed Oct 29, 2003 10:43 am Posts: 38 Location: Chicago
|
ass name="net.gainsystems.common.clientserverbatch.hibernate.purchase.order.quote.PoDetailQuote" table="PO_DETAIL_QUOTE">
<composite-id>
<key-property column="TRACKING_NUMBER" length="22" name="trackingNumber" type="long"/>
<key-property column="LINE_NUMBER" length="8" name="lineNumber" type="integer"/>
<key-property column="SPLIT" length="8" name="split" type="integer"/>
</composite-id>
<version column="hibernate_version" name="hibernateVersion" type="long" unsaved-value="null"/>
<property column="ITEM_NUMBER" length="65" name="itemNumber" type="string"/>
<set name="locationSetByItemNumber"
lazy="true"
inverse="true"
cascade="none">
<subselect>
Select
loc_no
From Skul skul left join Skul2 skul2
WHERE skul2.stock_ind != 'N'
AND skul.item_no = item_number
GROUP By locationNumber
</subselect>
<property name="locationNumber" column="loc_no"/>
<synchronize table="skul"/>
<synchronize table="skul2"/>
<key column="loc_no"/>
<many-to-many
class="net.gainsystems.common.clientserverbatch.hibernate.skul.Location">
</many-to-many>
</set>
how would i access the loc_no from the subselect and create a many-to-many read-only collection based on the the class property itemNumber
I know this is ugly, but it is what i have to work with
Location:
<hibernate-mapping>
<class name="net.gainsystems.common.clientserverbatch.hibernate.skul.Location"
table="Location">
<id column="loc_no" name="locationNumber" length="8" type="string">
<generator class="assigned"/>
</id>
<property column="loc_name" length="28" name="locationName" type="string"/>
</class>
</hibernate-mapping>
_________________ LET IT BE :)
|
|