0 Replies Latest reply on Sep 25, 2006 7:14 AM by fatbatman

    Custom/Tagged merge (XPost)

      XPost - http://forum.hibernate.org/viewtopic.php?t=965178


      Hi,

      Is there any way to annotate specific entity properties with tag(s) such as

      @merge("fromClient")
      public String getMessage(){ return message; }

      and then perform a em.customMerge(obj,"fromClient");
      that will only merge the fields annotated with that particular tag.

      This allow us to pass entities from the client to the db, without having a create DTO's or custom insert code.
      There is nearly always different set of fields that need to be updated depending on where the data is coming from, for example you probably don't want the client to be able to update his balance directly.

      Is there something like this in the EJB3 spec ?

      regards

      James