~Dave
---------------------------------------------------------------------- Reactor for ColdFusion Mailing List [email protected] Archives at http://www.mail-archive.com/reactor%40doughughes.net/Just as a note, actually having the relations in the DB is not required.
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Porter, Benjamin L.
Sent: Friday, February 10, 2006 3:04 PM
To: '[email protected]'
Subject: RE: Reactor For CF Using relational tables
Do you have the foreign and primary keys set up properly in the database tables? IE UserId is a pk on table User, RoleID is a pk on table Role, UserID and RoleID are fk to their respective tables.
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Dave Shuck
Sent: Friday, February 10, 2006 2:01 PM
To: [email protected]
Subject: Re: Reactor For CF Using relational tablesWell I just thought I had it but apparently I am still missing something. I am including a sample below that is similar to what I am doing. I am leaving out properties that aren't involved so as not to clutter things:
User
UserId
Role
RoleId
UserRole
UserRoleId
UserId
RoleId
Then in the reactor.xml I have
<object name="User">
<hasMany name="Role">
<link name="UserRole" />
</hasMany>
</object>
<object name="Role">
<hasMany name="User">
<link name="UserRole" />
</hasMany>
</object>
<object name="UserRole">
<hasOne name="User">
<relate from="UserId" to="UserId" />
</hasOne>
<hasOne name="Role">
<relate from="RoleId" to="RoleId" />
</hasOne>
</object>
This appears to match the documentation that I have. I have instantiated a User as User, and when I dump it I do see a method getRoleQuery().
When I try to dump user.getRoleQuery() I get an exception:
Variable getAlias is undefined.
I wondered if I was using an old code base or something but I pulled down the current build and am still seeing this problem. Does anyone see anything glaringly obvious I am missing?
Thanks,
~Dave
On 2/10/06, Dave Shuck <[EMAIL PROTECTED]> wrote:
....
--
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com****************************************************************************
This email may contain confidential
material. If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.***************************************************************************
--
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

