java - JPA2/Hibernate generated delete-statement missing a column -
using: spring, jpa2.0, hibernate, crudrepository
so heres relevant mapping-xml-parts..
article-entity:
<entity class="net.combase.cloud.data.pojo.articlepojo" metadata-complete="true" > <attributes> ///stuff following <element-collection name="prices" target-class="net.combase.cloud.data.pojo.pricepojo" fetch="lazy" > <collection-table> <join-column name="article_pojo" referenced-column-name="id" unique="false" /> </collection-table> </element-collection> </attributes> </entity>
price-embeddable
<embeddable class="net.combase.cloud.data.pojo.pricepojo" metadata-complete="true" access="property" > <attributes> <basic name="validfrom" optional="false"><temporal>timestamp</temporal></basic> <basic name="value" optional="false" /> <many-to-one name="pricegroup" target-entity="net.combase.cloud.data.pojo.pricegrouppojo" fetch="eager" optional="false"/> <many-to-one name="organizationalunit" target-entity="net.combase.cloud.data.pojo.organizationalunitpojo" fetch="eager" /> </attributes> </embeddable>
now if save article removed price.. statement in logs:
hibernate: delete article_pojo_prices article_pojo=? , price_group=? , valid_from=? , value=?
as can see... org-column ignored... if put optional=false on org work... thing is...i need column nullable.. ideas pleeaaase?
have nice day!
Comments
Post a Comment