I am using ActiveRecord RC3.  I have noticed that all of my [BelongsTo
("FK")] relationships automatically result in eager-loading of the
related entity, which is fine.  The problem is that the SQL generated
by NHibernate always uses outer joins even if my foreign key
relationship is on a column that is non-nullable.  When a column is
set as non-nullable (FK, int, not null) the SQL command should be an
inner join for better efficiency.

I have tried experimenting with the various attributes available on a
BelongsTo relationship, including setting NotNull=true and trying all
variations of Fetch=FetchEnum.___ and OuterJoin=OuterJoinEnum.___.  It
seems logical to me that there should be an option on FetchEnum for
InnerJoin.

Is there an attribute for ActiveRecord that allows me to tell the
BelongsTo relationship to use an inner join?  Thanks for your help!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to