1 Reply Latest reply on Mar 1, 2011 5:43 AM by Adam Warski

    Changes on @OneToOne association

    anonimo Newbie



      I have the following associations created:




      public class SomeClass {



                @OneToOne(cascade = CascadeType.ALL)

                @JoinColumn(name = "joincolumn")

                private AnotherClass clazz;






      public class AnotherClass {


           private String name;





      If I do:


      someClass.getClazz().setName("a new name");


      This causes a new revision of AnotherClass, but no new revision of the SomeClass entity. I would expect Envers to create a new revision of the "owner" and the "owned" relationships, as otherwise it will force me to implement the AnotherClass class fields as part of the SomeClass fields in order to get new revisions on its attributes changes.


      Modifying the



      property doesn't seem to help.

      Any ideas if this is possible or am I doing something wrong here?