I can't really articulate what I want in the title very well but essentially is this possible?
public class Employee {
public Address address;
...
public class address {
...
Very simple object model, an Employee that has an Address object property. In NHibernate when this is mapped will produce something like:
table Employee
EmployeeId
AddressId
...
table Address
AddressId
...
So this is all good so far, my Employee table has a foreign key column to the Address table, perfect. What I want though is when I do a get with NHibernate that it doesn't join on that table and populate the Address object but instead instantiate the Address object and only populate the AddressId property.
Now before I get loads of responses about NHibernates lazy loading I already know. This is more of a "Is is possible" not a "is it a good idea" because I'm sure it's probably not. I just like to see how flexible NHibernate is.