Christopher,
What you have defined, is that every Consultant is a User AND that every User is a Consultant. Drop the "hasOne" in the User object and things will go smoother...
Wouter
On Aug 19, 2006, at 00:27, Christopher Bradford wrote: I have the following database scenario: A User may *or may not* be a Consultant (a Consultant is always a User). We have split the data for Users and Consultants into two separate tables, as some Consultant data is not applicable to a User. This scenario is almost exactly the one outlined in the Reactor docs regarding the sharedKey attribute (see my earlier posts on this topic). The difference is that *not all* Users are Consultants. Problem is, there apparently isn't a way to tell Reactor that the "hasOne" from the user side is optional. Reactor always creates a Consultant object for every User object and saves them when I save the User. Is there a way to configure things so that there can be no Consultant object? reactor.xml snippets: <object name="user"> ... <!-- consultant "is-a" user --> <hasOne name="consultant" sharedKey="true"> <relate from="ID" to="ID" /> </hasOne> ... </object> <object name="consultant"> ... <!-- Consultant "is-a" user --> <hasOne name="user"> <relate from="ID" to="ID" /> </hasOne> ... </object> Christopher Bradford
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 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/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|