I think generally the "from" is the column in the "current" table, e.g.:

<object name="Customer">
  <hasOne name="Address">
     <relate from="addressId" to="Id" />
  </hasOne>
</object>

But I could have it backwards.  Trial and error should get you going, and
it states somewhere in the docs which is which for what, I believe.

Still too new myself to have it memorized correctly.
:D

On 8/20/06, Quinn Clark <[EMAIL PROTECTED]> wrote:
New subscriber, first post.  I've been trying to get my head around Model
Glue:Unity, but I've ignored the Reactor piece of it until now.  Well, I
finally got tired of writing virtually the same DAO code over and over and
over again, so yesterday I set up Reactor, tried a few basic functions, and
it just worked.  I was able to get rid of the DAO references in my
Controller.cfc and just point everything to Reactor.  Very, very slick.
Thanks, Doug for all the work that must have gone into this.

OK, so simple question as I set up my object relationships.  Here's the
example from the documentation:

<object name="Customer">
  <hasOne name="Address">
     <relate from="addressId" to="addressId" />
  </hasOne>
</object>

In my own table naming conventions, I would name these fields 'id' (PK in
the address table) and 'addressId' (FK in the customer table), so I
apologize if this is obvious to everyone else, but which 'addressId' belongs
to which table in the relate tag?

Thanks,
Quinn




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to