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 tables
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.
***************************************************************************

