Search   

Sunday, February 05, 2012

Support » Support Forum

Register  Login

 Menu  
 
    

 Welcome!  
 


Welcome to the NDO support forum!

kreis.gif Please register/login at the site if you want to post a thread. We sometimes copy support mails of common interest to the forum. They appear with anonymous sender.
kreis.gif Please post your messages in English language if possible. You can do your posts also in German, we will translate your post and our answer so that all users of the forum can read your posts.
kreis.gif The forum software requires that javascript is enabled.
kreis.gif Please do not insert licence information or licence keys in forum posts.
kreis.gif If you know a good answer to a post of another user, feel free to reply!
kreis.gif The forum is monitored. We reserve the right to remove posts we consider not to be useful for other forum users.

   Print   

      
 NDO Support Forum  
 
SearchForum Home
  NDO-Forum postings in english please, if possible.  Developing with NDO  Loading an obje...
 Loading an object twice
 
 5/15/2006 6:12:08 PM
anonymous
20 posts


Loading an object twice
 Modified By anonymous  on 5/15/2006 6:13:32 PM)
Hi all, if I load an object with the same query into memory twice, I would expect to have only one object with two references. Is that true for NDO? For example what happens in this situation: I have a table "Gender" with two entries male/female. I load the record male, and after that I load all records (male and female). Is NDO able to detect that male is already in memory? Does is return female as new and male as existing object? What happens if the object male is already changed in memory so there is a difference to the database. Am I notified of that? C.R.
 5/15/2006 6:17:28 PM
Mirko
109 posts
5th


Re: Loading an object twice
Hi C.R., NDO always works with just one instance of an object in one PersistenceManager. In your sample, NDO would detect that the male object is already in memory. Although the underlying SQL query returns the corresponding data row as result again, the existing object is used. If the object was changed before the second query, the changes remain intact and are stored with the next call to Save(). If you are using several PersistenceManager instances in parallel, you can also manage several copies of the same object. This is the same as if the object were accessed by several concurrent client machines. Best Regards, Mirko
  NDO-Forum postings in english please, if possible.  Developing with NDO  Loading an obje...
  SearchSearch  Forum HomeForum Home