Michael, I have no experience with Unity but if you want left joins you could just replace the  generated code and create a custom query for that view. Reactor don't create left, right and full outer joins based on field attributes.

João Fernandes

On 8/6/06, Michael Wolfe <[EMAIL PROTECTED]> wrote:
I'm using MG:U scaffolds, so the query is auto-generated.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of João Fernandes
Sent: Sunday, August 06, 2006 8:11 AM
To: [email protected]
Subject: Re: [Reactor for CF] joins on nullable columns

Michael,

Can you share the code of your query?

João Fernandes


On 8/6/06, Michael Wolfe <[EMAIL PROTECTED] > wrote:
I have a MG:U app with the following Reactor configuration (see below)...
 
In the positions table, education_id is nullable, but when the query is run, an INNER JOIN is used to like the positions and education tables. It seems to me that if the relationship is on a nullable column, this implies that a LEFT JOIN should be used.
 
-- Mike Wolfe
 
<reactor>
 <objects>
  <object name="education">
   <hasMany name="position">
    <relate from="education_id" to="education_id" />
   </hasMany>
   <hasMany name="resumes">
    <relate from="education_id" to="education_id" />
   </hasMany>
  </object>
  
  <object name="position">
   <hasOne name="users">
    <relate from="user_id" to="user_id" />
   </hasOne>
   <hasOne name="education">
    <relate from="education_id" to="education_id" />
   </hasOne>
  </object>
  
  <object name="resumes">
   <hasOne name="users">
    <relate from="user_id" to="user_id" />
   </hasOne>
   <hasOne name="education">
    <relate from="education_id" to="education_id" />
   </hasOne>
  </object>
  
  <object name="user_type">
   <hasMany name="users">
    <relate from="user_type_id" to="user_type_id" />
   </hasMany>
  </object>
  
  <object name="users">
   <hasOne name="user_type">
    <relate from="user_type_id" to="user_type_id" />
   </hasOne>
  </object>
 </objects>
</reactor>
 
 
 

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to