java - is it possible to update entity with out setters being called in jpa -


i working on application, has entity called my.java, extending entity has field called edited. field updated current time stamp, each update

i using single table inheritance strategy.

i using jpa/eclipse link persistance provider.

edited field updating current time stamp out setter method called, there no other references in java code changing value of edited field.

while debugging can see update ql statement, edited field update.

i wondering why/how it's value updating, it possible out setter invocation?

here mapped super class:

  @mappedsuperclass  public abstract class superentity implements  serializable {      /**  *   */ private static final long serialversionuid = 1125783654888232605l; /**  * time entry created  */ @column(name = "created") private timestamp created; /**  * date entry edited  */ @column(name = "edited") @version private timestamp edited; 

check these things.

  1. your entity may implementing kind of auditable interface
  2. your field may having @version annotation

in 1st case have figure out interface usage , can understand in 2nd case it's default , expected behavior in ejb , hibernate.

i got link after googling may useful you

https://technology.amis.nl/2006/01/03/ejb-30-persistence-using-the-version-annotation-for-optimistic-locking-in-the-glassfish-reference-implementation/

it's not big worry thing, can on easily


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -