I've had to adjust something so Track_id is now optional. it's now a
left outer join between "session" and "track"
1) do I need to adjust anything in the reactor.xml?
<object name="session">
<hasOne name="track">
<relate from="Track_id" to="Track_id" />
</hasOne>
<!-- other joins omitted -->
</object>
<object name="track">
<hasMany name="session">
<relate from="Track_id" to="Track_id" />
</hasMany>
</object>
2) Is this how I can get to the left joined records?
<cfset SessionGateway = _getReactorFactory().createGateway("Session") />
<cfset Query = Session.createQuery() />
<!--- add any track details to the sessions query if available --->
<cfset Query.join("Session", "Track", "left") />
<cfset currentSessions = SessionGateway.getByQuery(Query) />
thanx
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --