• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nulling managed entities

 
Brian Smith
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, this should be pretty basic but was unable to find an answer via google.

What happens when you null an entity when using an Extended PC? I would think that it does not alter the underlying data model at all and should just act like any other pojo. In order to affect the data model you would have to call an EntityManager method like .remove(), correct?

It is just confusing to me because you can update an entity just by calling setter methods without calling any entity manager methods.

Example



The underlying data row for foo with id = "SomeId" should be unchanged?

I would test this myself but do not have the facilities to do so at the moment.

Thanks.
[ July 11, 2007: Message edited by: Brian Smith ]
 
Brian Smith
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was able to test this today, for anyone who cares...

When a managed entity is set to null, the underlying data model does not change. The entity becomes detached and dereferenced like any other object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic