Hibernate version: 3
I'm not having a bug per se, i just have a one to many assoc, but i CAN save zero elements on the many side. Is this right? is there a way to validate that the many side has at least one element, instead of zero? I mean, i could do it in the program side, but perhaps im mapping it wrong. My map looks like:
<hibernate-mapping>
<class name="com.ge.nbc.fcclicense.bus.license.domain.FCCLicense" table="FCC_LICENSE">
<id name="fccLicenseID" column="FCC_LICENSE_ID" type="long" unsaved-value="-1">
<generator class="sequence">
<param name="sequence">FCC_LICENSE_SEQ</param>
</generator>
</id>
<set name="transmitterSet" cascade="save-update" lazy="true" not-null="true" >
<key column="FCC_LICENSE_ID" />
<one-to-many class="com.ge.nbc.fcclicense.bus.license.domain.Transmitter" />
<filter name="filterDeleted" condition="DELETED_FLAG = 'N'"/>
</set>
</class>
thks very much in advance!
|