I'm developing a common modular architecture for several applications
and I came to the following problem.

Different entities with their mappings may be contained in different
assemblies. Some assemblies are "base" (e.g., assembly "Base" contains
class "User, Base") while other assemblies contain domain-specific
entities that reference "base" entities (e.g., property "Owner" of
class "RealtyObject, Application" is a reference to "User, Base").

I want to perform HQL queries like "select u, ro from User u left join
RealtyObject ro" - but HQL only allows mapping by assocation paths. I
can not create property "RealtyObjects" on class "User" (which would
be an inverse for reference "RealtyObject.Owner") because assembly
"Base" must be independent of assembly "Application".

I'm using Fluent NHibernate to map classes and I could at runtime
decide to add such associations (but I can't change the classes
themselves). This way I could add an inverse one-to-many association
that would allow me to perform LEFT JOIN queries.

1. Is there any way to perform LEFT OUTER joins (with HQL, Criteria
API, QueryOver or LINQ) without mapping the inverse associatoin?

2. Is there any way to add one-to-many association to the class
without adding a property to it?

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to