just describe your BookingItem object with hasMany and hasOne childs to indicate the relationship between that table and those 10 other tables.
Then, if you want to create a query with all those joins you have to create a query object and do
<cfset myquery.join("BI","myfirstTable","myrelationshipalias")>
<cfset myquery.join("BI","mySecondTable","my2relationshipalias")>
...
Take a look at the query object inside reactor/query/ folder
well, I think this will be enough, I just woke up so I still don't have reactor loaded in my mind :)
João Fernandes
Ok I have a components table, that can be any number of different types and has a separate table here is a query which I would like to see if I can get into reactor.
select
dbo.BookingOptions.OptionsId, dbo.BookingOptions.BO_ID, dbo.BookingOptions.BI_ID, dbo.BookingOptions.BookingOrder,
dbo.BookingOptions.BookingOption, dbo.BookingOptions.OptionInvoiced, dbo.BookingOptions.IsConfirmed, dbo.BookingItems.BI_ParentItem, dbo.BookingItems.BI_Order,
dbo.BookingItems.BI_Type, dbo.BookingItems.BI_Status, dbo.BookingItems.BI_Component, dbo.BookingItems.BI_StartDate,
dbo.BookingItems.BI_Days, dbo.BookingItems.BI_DeptPort, dbo.BookingItems.BI_DestPort, dbo.BookingItems.BI_NettPrice,
dbo.BookingItems.BI_Price, dbo.BookingItems.BI_Currency, dbo.BookingItems.BI_CurRate, dbo.BookingItems.BI_Commision,
dbo.BookingItems.BI_Tax, dbo.BookingItems.BI_Markup, dbo.BookingItems.BI_Credit, dbo.BookingItems.BI_GSTApplies, dbo.BookingItems.BI_Qty,
dbo.BookingItems.BI_isPackage, dbo.BookingItems.BI_enterDate, dbo.BookingItems.BI_requestDate, dbo.BookingItems.BI_ConfDate,
dbo.BookingItems.BI_Notes, dbo.BookingItems.BI_ConfNo, dbo.BookingItems.BI_Details, dbo.BookingItems.BI_BookingOrder,
dbo.BookingItems.BI_IsConfirmed
from
dbo.Bookings
inner join
dbo.BookingOptions on dbo.Bookings.BO_ID = dbo.BookingOptions.BO_ID
inner join
dbo.BookingItems on dbo.BookingOptions.BI_ID = dbo.BookingItems.BI_ID
where
dbo.BookingOptions.BO_ID = <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#arguments.id#" />
<cfif Client.BookingType eq "BO">
and BookingOptions.IsConfirmed = 1
</cfif>
order by
BookingOption, BookingOrder, BI_TYPE, BI_Order
Now the problem lies with BI_Component, how can I tell this to read from any number of tables, for example flightComponents, or TourComponents.
And the relationship is between these two is BI_Component for about 10 more tables.
Any ideas?
Senior Coldfusion Developer
Aegeon Pty. Ltd.
Phone: +613 8676 4223
Mobile : 0404 998 273
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

