aspose file tools
The moose likes Object Relational Mapping and the fly likes nulling managed entities Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "nulling managed entities" Watch "nulling managed entities" New topic
Author

nulling managed entities

Brian Smith
Ranch Hand

Joined: May 20, 2005
Posts: 63
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

Joined: May 20, 2005
Posts: 63
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.
 
IntelliJ Java IDE
 
subject: nulling managed entities
 
Threads others viewed
javascript object how to retrieve properties
MVC is not object oriented??
About the javabean properties problem?
Wanted: conceptual tutorial on JTable
Is it legal to use SwingWorker in your assignment?
IntelliJ Java IDE