I was experimenting with eclipselink. I am trying to update an existing entity in database. The JPA entity only has public fields and fields are annotated with JPA annotation. The code loads an entity using EntityManager.find()
.
The code creates an instance of JPA entity, assigns value to public fields of the entity and invokes EntityManager.merge(entity) method. Eclipselink does not update database record. I enabled log to see whether Eclipselink issues SQL statement or not.
Eclipselink does not issue any update statement. Does this mean that even if I use field persistence, I can not assign value to public fields of the entity instead of using setter method?
Thanks, Chir