Hi all,
I have a legacy database that I am working with, and I've come across an
interesting implementation that I was hoping someone else might have
experienced whilst using Reactor.
The database that I have has 3 tables (customer, staff and company) that
all store their respective records. Each of these record types can be
related to several address records.
The address table is configured with 2 columns, one called IDNum, the
other IDType. Basically, the gist of this is that the primary key of
the respective record will be stored in the IDNum column, with the
IDType column being set to either "customer, staff or company", allowing
us to determine which records relate to what tables.
This is all well and good, but how do I go about representing this
relationship in Reactor ?
My staff record configuration in Reactor currently looks something like
this;
<object name="staff">
<hasMany name="phone">
<relate from="num" to="idnum" />
</hasMany>
</object>
However, if I get a staff record from reactor, the attached iterator
could possibly serve up records that belong to a customer or company (as
these records would have the same primary key whilst coming from
different tables).
So it seems that I need the ability to do is something more like;
<object name="staff" alias="staff" >
<hasMany name="phone">
<relate from="num" to="idnum" />
<where column="IDType" hasvalue="Customer" />
</hasMany>
</object>
Anyone have any ideas on how I might be able to address this ? Is there
something that I have missed somewhere along the way ?
Thanks in advance for any responses.
Cheers,
Callum
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --