Q:

cascade in mapping by code

User is an entity and Address is a component. One User can have one Address. 
Address cannot live outside user object. So if user is deleted I want to delete and Address object as well. 
Is this Cascade.DeleteOrphan? and if it is how to set it using mapping by code in nhibernate.

A:

Yes, you should use cascading. Take a look at the documentation for more details.

