Menu

Lazy (oneToOne)

2005-01-13
2013-03-07
  • Nobody/Anonymous

    I am view in the NunitTest an example with retriveAutomatic="Lazy" to oneToOne association.

    It is posible?

     
    • Richard Banks

      Richard Banks - 2005-01-17

      Hi - I'm not sure what you are asking.  I've just got back from a week away on the beach and my head is still full of sand :-)

      Do you want to
      1.  See an example in the NUnit tests for lazy load, or
      2.  Have a test written for something specific?

       
    • Nobody/Anonymous

      In your example of the NUnit you have  retriveAutomatic="Lazy" to oneToOne association

       
    • Nobody/Anonymous

      In the NonInheritedTests there is a test called LazyLoadEmployees, it simply retrieves a LazyEmployee object from the database and checks the state of what it retrieves.

      What you will see is what looks like a normal FindObject operation and then a number of asserts.  This is the same as if the association has retrieveAutomatic="true" the only difference being that the retrieved objects are proxy objects, not full objects.

      The XML mapping for the test has retrieveAutomatic ="lazy" on both the one-to-one association and the one-to-many associations.

      I hope this helps.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.