iammatis / diploy

0 stars 0 forks source link

Listening to object changes #13

Open iammatis opened 5 years ago

iammatis commented 5 years ago

Detect attribute changes to an object.

Cat cat = em.find( Cat.class, new Long(69) );
cat.setName("PK");
em.flush();  // changes to cat are automatically detected and persisted
iammatis commented 5 years ago

No better way of checking for changes than keeping two separate entity Maps and going through both of them and comparing hashcode(), as of right now.