[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-torque-dev
Subject:    [jira] Created: (TORQUE-55) Generated OM compilation fails when
From:       "Declan Shanaghy (JIRA)" <jira () apache ! org>
Date:       2006-09-15 16:12:22
Message-ID: 30052755.1158336742375.JavaMail.jira () brutus
[Download RAW message or body]

Generated OM compilation fails when table has 2 foreign keys to another table (and \
                generateBeans=true)
------------------------------------------------------------------------------------------------------


                 Key: TORQUE-55
                 URL: http://issues.apache.org/jira/browse/TORQUE-55
             Project: Torque
          Issue Type: Bug
    Affects Versions: 3.2
         Environment: JDK 1.5, Torque 3.2
            Reporter: Declan Shanaghy


Given the following object model in a project where generateBeans=true 

BOOK
-------------------------
book_id :  int
author_id : int (FK)
coauthor_id : int (FK)

AUTHOR
------------------------
author_id : int
name : varchar(255)

Compilation of the generated code fails with error messages shown below

C:\Documents and Settings\Declan\bookstore\src\java\com\kazmier\om\BaseAuthor.java:1123: \
cannot find symbol symbol  : method addBookFromBean(com.kazmier.om.Book)
location: class com.kazmier.om.Author
                    result.addBookFromBean(related);
                          ^
C:\Documents and Settings\Declan\bookstore\src\java\com\kazmier\om\BaseAuthor.java:1137: \
cannot find symbol symbol  : method addBookFromBean(com.kazmier.om.Book)
location: class com.kazmier.om.Author
                    result.addBookFromBean(related);


The solution is to change lines 1123 & 1137 from

                    result.addBookFromBean(related);
                    result.addBookFromBean(related);

to

                    result.addBookRelatedByAuthorIdFromBean(related);
                    result.addBookRelatedByCoAuthorIdFromBean(related);



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: \
                http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic