I recently began using Fluent Nhibernate for my data layer and have come across an issue. Whenever i want to delete a record that has multiple foreign key constraints, i have to create another class just to represent that database entity. That means that for something like a User record, which has relationships with many other tables, i have to create something like 10 different classes that i will never use for any other purpose. At least that is my understanding of how things work.
Is there a way for me to delete all of these records without having to map them. For instance, using the User example, a User can have multiple roles, departments, email addresses, phone numbers, addresses, and so on. I would like to delete all of these records, but not have to map all of them in Nhibernate classes.
Is there a property i can set on my UserMapping that would accomplish this?
Thanks!