Ticket #56 (closed defect: invalid)
Error produced with identical table and field names
| Reported by: | ctoth@… | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Version: | 2.0.304 | Severity: | normal |
| Keywords: | Cc: |
Description
When you have a two tables joined through the reactor.xml file and one of the fields in the table matches the name of one of joined tables MG2 breaks with the following error.
This was when using scafolding.
Oops!
Message Routines cannot be declared more than once.
Detail The routine "setstatus" has been declared twice in the same file.
The CFML compiler was processing:
* a cffunction tag beginning on line 89, column 10.
Extended Info
Tag Context C:\Inetpub\wwwroot\reactor\project\mg2test\Record\userRecord.cfc (89)
C:\Inetpub\wwwroot\reactor\core\objectFactory.cfc (131)
C:\Inetpub\wwwroot\reactor\reactorFactory.cfc (25)
C:\Inetpub\wwwroot\ModelGlue\unity\orm\ReactorAdapter.cfc (343)
C:\Inetpub\wwwroot\ModelGlue\unity\controller\ReactorORMController.cfc (68)
C:\Inetpub\wwwroot\ModelGlue\unity\listener\Listener.cfc (26)
C:\Inetpub\wwwroot\ModelGlue\unity\eventrequest\MessageBroadcaster.cfc (32)
C:\Inetpub\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (310)
C:\Inetpub\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (268)
C:\Inetpub\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (241)
C:\Inetpub\wwwroot\ModelGlue\unity\ModelGlue.cfm (47)
C:\Inetpub\wwwroot\mg2test\index.cfm (33)
An example I was using was a user table that joined the status for the record from a table called status. The field name in the user table was status and the table I was joining to was status.
Example of entry in my reactor.xml file.
<object name="user"> <hasOne name="status"> <relate from="status" to="statusID"/> </hasOne> </object>
Change History
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)