[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3963) Reverse engineering Event database table results in Home class that will not compile

Julien Kronegg (JIRA) jira-events at lists.jboss.org
Wed Sep 30 08:07:49 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-3963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12487883#action_12487883 ] 

Julien Kronegg commented on JBSEAM-3963:
----------------------------------------

Seam-gen should not allow methods names that are overriding EntityHome.

The same problem occurs when the COMPANY table has a ID_CUSTOMER (a foreign key on the CUSTOMER table) and a CUSTOMER String column. Hibernate manage it by generating a "public Customer getCustomer() {..}" method and a "public String getCustomer_1() {..}" method (notice the "_1" suffix).

Seam should use the same trick for EntityHome.

> Reverse engineering Event database table results in Home class that will not compile
> ------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-3963
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3963
>             Project: Seam
>          Issue Type: Bug
>    Affects Versions: 2.1.1.GA
>         Environment: WIndows XP, MYSQL 5 database
>            Reporter: Bruce Link
>
> Database has tables XUSER and EVENT.  EVENT has a foreign key to XUSER.  seam generate-entities generates a XuserHome.java file with accessor
> public List<Event> getEvents();  resulting in compiler error:
>     [javac] c:\apps\projects\infosys211\src\hot\ca\bcit\infosys\session\XuserHome.java:54: getEvents() in ca.bcit.infosys.session.XuserHome cannot override getEvents() in org.jboss.seam.framework.Controller; attempting to use incompatible return type
>     [javac] found   : java.util.List<ca.bcit.infosys.model.Event>
>     [javac] required: org.jboss.seam.core.Events
>     [javac]     public List<Event> getEvents() {
>     [javac]                            ^

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

        


More information about the seam-issues mailing list