hello,

i have a problem changing  Entities and ValueObjects.
i have a simple structur:

Entity UserData
{
        scaffold
        
        String lastName length="256";
        String  firstName length="256";

        - List<@ContactChannel> contactChannels cascade="all-delete-orphan";

        - @ContactChannel singleContactChannel; 
}

ValueObject ContactChannel
{
        String identifier length="256";
        Boolean business;
        String addon nullable length="256";
}

1. When i change the singleContactChannel  on a UserData entity and save the
entity, then the new singleContactChannel is saved in the database but the
old one is not deleted. Is there a way to solve this problem? I know that
the relation between the Entity and the ValueObject is generated as an
ManyToOne Relation and Hibernate can´t delete-orphan these relation. I don´t
want to use a bidirectional relation.


2. On the List with contactChannels the delete-orphan works fine. But i have
to define explicit the cascade="all-delete-orphan" in my model. Is there a
way to generated the delete-orphan automatically because its an relation
between entity and valueobject? 

thx markus
-- 
View this message in context: 
http://old.nabble.com/Sculptor-1.8.0-ValueObject-delete-orphan-tp28175885s17564p28175885.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to