im trying to use Nhibernate in a web services scenario which has been working ok so far. But i am running into some difficulty. If i specify an Object A to be related to Object B in the mapping file, it will auto load object when i fetch Object A. Now i think the only way i can stop it from automatically doing that is by setting the mapping file to lazy=true. Problem is, when it gets serialized the serializer would access the property and load it anyway.
Is there another way to accomplish this? Some setting or somethings thats like lazy=false but it wont load object B when i loadObject A and yet still let me define the relationships in the mapping file so i can use them in HQL?
|