Simeon and all,
When I changed the XLM to what you provided and i'm getting this error
when I run the code below:

<cfset local.gateway = variables.reactor.createGateway("ROLES") />

First Attempt:
<cfset local.query =
local.gateway.createQuery().join('ROLES','EVENT_ROLE','ER_').join('EVENT_ROLE','EVENTS','E_')
/>

I also tried this and got a similar message:
<cfset local.query = local.gateway.createQuery().join('ROLES','EVENTS','E_') />

Message Relationship Does Not Exist
Detail The object 'EVENT_ROLE' does have have a relationship with an
alias of 'EVENTS'.
Extended Info
Tag Context F:\MARC\Reactor\base\abstractMetadata.cfc (167)


Here is what is in my file.

<object name="EVENTS">
    <hasmany name="ROLES">

        <link name="EVENT_ROLE" />
    </hasmany>
</object>

<object name="ROLES">
    <hasmany name="EVENTS">

        <link name="EVENT_ROLE" />
    </hasmany>
</object>
<object name="EVENT_ROLE">
    <hasone name="EVENTS">
        <relate from="EVENT_SK" to="EVENT_SK" />
    </hasone>
    <hasone name="ROLES">

        <relate from="ROLE_SK" to="ROLE_SK" />
    </hasone>
</object>


Thanks for your help.

On 4/10/06, Simeon Bateman <[EMAIL PROTECTED]> wrote:
>
> Ignore that code in the other post.  Gmail sent too early :)
>
> Here is what I think that config would look like:
>
> <object name="EVENTS">
>     <hasmany name="ROLES">
>
>         <link name="EVENT_ROLE" />
>     </hasmany>
> </object>
>
> <object name="ROLES">
>     <hasmany name="EVENTS">
>
>         <link name="EVENT_ROLE" />
>     </hasmany>
> </object>
> <object name="EVENT_ROLE">
>     <hasone name="EVENTS">
>         <relate from="EVENT_SK" to="EVENT_SK" />
>     </hasone>
>     <hasone name="ROLES">
>
>         <relate from="ROLE_SK" to="ROLE_SK" />
>     </hasone>
> </object>
>
>
> Let me know if that makes sense.  EVENTS haveMany ROLES; ROLES haveMany 
> EVENTS; and the to are linked by the EVENT_ROLE object.
>
> sim
>
>
>
> On 4/9/06, Simeon Bateman <[EMAIL PROTECTED]> wrote:
> >
> > Looking at this closer here is what I would expect to see.  It appears that 
> > the EVENTS object need to have a "hasMany" relations ship with ROLES.  and 
> > then you would link those via teh Event_ROLE table.  I would expect the 
> > confif for that to look like this.
> >
> >
> >   <object name="EVENTS">
> >
> >             <hasmany name="EVENT_ROLE">
> >
> >                   <link name="EVENT_ROLE" />
> >
> >             </hasmany>
> >
> >       </object>
> >
> >
> >  <object name="ROLE">
> >
> >    <hasMany name="EVENTS">
> >
> >
> >
> >
> >
> >
> > </object>
> >
> >
> >           <object name="EVENT_ROLE">
> >
> >                   <hasone name="EVENTS">
> >
> >                         <relate from="EVENT_SK" to="EVENT_SK" />
> >
> >                   </hasone>
> >
> >                   <hasone name="ROLES">
> >
> >                         <link name="ROLES" />
> >
> >                   </hasone>
> >
> >             </object>
> >
> >
> >
> >
> >
> >
> > On 4/8/06, Brian Billings < [EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > >
> > > Yesterday I submitted a post about the problem I am having with the alias 
> > > in the reactor config file (which is still unresolved) and I believe it 
> > > was Simeon that brought up a possible issue with the way I am linking 
> > > objects in the cofig file.
> > >
> > >
> > >
> > > I have had a very hard time wrapping my head around how the config file 
> > > works and I honestly still don't understand it completely. My code runs 
> > > with all of the intricate joins so I don't think it is totally wrong.
> > >
> > >
> > >
> > > I have attached a gif of my database tables and the Reactor file. I don't 
> > > have all of the objects mapped yet (im basically mapping the 
> > > relationships as I need them).
> > >
> > >
> > >
> > > Before I go forward I would like to be sure that am I doing this right? 
> > > Like I mentioned, it works.
> > >
> > >
> > >
> > >
> > >
> > > Summary of what I am doing:
> > >
> > > -Roles are defined (ROLES)
> > >
> > > -Applications are defined (APPLICATIONS)
> > >
> > > -Applications have events (APPLICATION_EVENT)
> > >
> > > -Events are assigned roles (EVENT_ROLE)
> > >
> > > -User are assigned roles via direct mapping (USER_ROLE) or via group 
> > > (GROUPS, GROUP_ROLE & GROUP_USER)
> > >
> > > -User must have one or more roles assigned to the event to see the event
> > >
> > >
> > >
> > > <reactor>
> > >
> > >       <config>
> > >
> > >             <project value="MARC" />
> > >
> > >             <dsn value="MARC" />
> > >
> > >             <type value="mssql" />
> > >
> > >             <mapping value="/core/model/Reactor" />
> > >
> > >             <mode value="always" />
> > >
> > >       </config>
> > >
> > >
> > >
> > >
> > >
> > >       <objects>
> > >
> > >
> > >
> > >       <object name="EVENTS">
> > >
> > >             <hasmany name="EVENT_ROLE">
> > >
> > >                   <link name="EVENT_ROLE" />
> > >
> > >             </hasmany>
> > >
> > >       </object>
> > >
> > >
> > >
> > >           <object name="EVENT_ROLE">
> > >
> > >                   <hasone name="EVENTS">
> > >
> > >                         <relate from="EVENT_SK" to="EVENT_SK" />
> > >
> > >                   </hasone>
> > >
> > >                   <hasone name="ROLES">
> > >
> > >                         <link name="ROLES" />
> > >
> > >                   </hasone>
> > >
> > >             </object>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >             <object name="GROUP_ROLE">
> > >
> > >                   <hasone name="GROUPS">
> > >
> > >                         <relate from="GROUP_SK" to="GROUP_SK" />
> > >
> > >                   </hasone>
> > >
> > >                   <hasone name="ROLES">
> > >
> > >                         <link name="ROLES" />
> > >
> > >                   </hasone>
> > >
> > >             </object>
> > >
> > >
> > >
> > >             <object name="GROUPS">
> > >
> > >                   <hasmany name="GROUP_ROLE">
> > >
> > >                               <link name="GROUP_ROLE" />
> > >
> > >                   </hasmany>
> > >
> > >
> > >
> > >             </object>
> > >
> > >
> > >
> > >             <object name="USER_ROLE">
> > >
> > >                   <hasone name="USERS">
> > >
> > >                         <relate from="USER_SK" to="USER_SK" />
> > >
> > >                   </hasone>
> > >
> > >                   <hasone name="ROLES">
> > >
> > >                         <relate from="ROLE_SK" to="ROLE_SK" />
> > >
> > >                   </hasone>
> > >
> > >             </object>
> > >
> > >
> > >
> > >             <object name="ROLES">
> > >
> > >                   <hasMany name="GROUP_ROLE">
> > >
> > >                         <relate from="ROLE_SK" to="ROLE_SK" />
> > >
> > >                   </hasMany>
> > >
> > >                   <hasMany name="EVENT_ROLE">
> > >
> > >                         <relate from="ROLE_SK" to="ROLE_SK" />
> > >
> > >                   </hasMany>
> > >
> > >                   <hasMany name="USER_ROLE">
> > >
> > >                         <relate from="ROLE_SK" to="ROLE_SK" />
> > >
> > >                   </hasMany>
> > >
> > >             </object>
> > >
> > >
> > >
> > >             <object name="USERS">
> > >
> > >                   <hasMany name="USER_ROLE">
> > >
> > >                         <relate from="USER_SK" to="USER_SK" />
> > >
> > >                   </hasMany>
> > >
> > >                   <hasMany name="GROUP_USER">
> > >
> > >                         <relate from="USER_SK" to="USER_SK" />
> > >
> > >                   </hasMany>
> > >
> > >             </object>
> > >
> > >
> > >
> > >             <object name="GROUP_USER">
> > >
> > >                   <hasOne name="GROUPS">
> > >
> > >                         <relate from="GROUP_SK" to="GROUP_SK" />
> > >
> > >                   </hasOne>
> > >
> > >             </object>
> > >
> > >
> > >
> > >       </objects>
> > >
> > > </reactor>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>



-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/


Reply via email to