I'm doing some tests with Reactor/Sql Server and I got an error in the
generation of the Gateway objects for a table
having a PK made of two fields, namely an UsersGroups table (which relate
the Users and Groups tables) .

The UsersGroups table structure is
      IDUser int PK
      IDGroup int PK
      DateCreated date

The Users and Groups table have a unique PK, respectively IDUser and
IDGroup

The relavant reactor.xml section is:
            <object name="Users">
                  <hasMany name="Groups">
                        <link name="UsersGroups" />
                  </hasMany>
            </object>
            <object name="Groups">
                  <hasMany name="Users">
                        <link name="UsersGroups" />
                  </hasMany>
            </object>
            <object name="UsersGroups">
                  <hasOne name="Users">
                        <relate from="IDUser" to="IDUser" />
                  </hasOne>
                  <hasOne name="Groups">
                        <relate from="IDGroup" to="IDGroup" />
                  </hasOne>
            </object>

Whilst the UsersDAO and the GroupsDAO are generated fine, I found the error
is caused by the generated UsersGroupsDAO.cfc which has a missing comma in
a statement of the exists method:

<cfset qExists = UsersGroupsGateway.getByFields(IDUser =
arguments.to.IDUserIDGroup = arguments.to.IDGroup) />
instead of
<cfset qExists = UsersGroupsGateway.getByFields(IDUser =
arguments.to.IDUser,IDGroup = arguments.to.IDGroup) />

Is there something wrong with my reactor.xml or is there a bug in the
framewok code?

Thanks
Giampiero

-------------------------------------------------------------------------------------
 NOTICE: this e-mail and any attachments thereto contain information,
which is confidential, proprietary, privileged and/or protected from
disclosure by intellectual property rights and are intended for the sole
use of the recipient(s) named above and may be legally privileged. If you
are not the intended recipient of this message you are hereby notified that
any dissemination or copying of this message is strictly prohibited. If you
have received this e-mail in error, please notify the sender either by
telephone or by e-mail and delete the material from any computer. Although
we attempt to sweep e-mail and attachments for viruses, it does not
guarantee that either is virus-free and Foster Wheeler organization accept
no liability for any damage sustained as a result of viruses.
-------------------------------------------------------------------------------------



 

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


Reply via email to