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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am view in the NunitTest an example with retriveAutomatic="Lazy" to oneToOne association.
It is posible?
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?
In your example of the NUnit you have retriveAutomatic="Lazy" to oneToOne association
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.