Announcement Announcement Module
Collapse
No announcement yet.
Is Entity Relationship with GWT scaffold working? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is Entity Relationship with GWT scaffold working?

    hi all,

    I am trying to define simple *-to-1 unidirectional relationship with Roo+GWT. I got the hibernate mapping notation done and I can see the schema was generated correctly but the scaffolding gui is giving an error on access:

    14:44:47.585 [ERROR] [applicationScaffold] The type of value String UiField com.google.gwt.user.client.ui.TextBox empType can receive does not match the type of property EmployeeTypeRecord


    I have roughly the following defined:

    Employee {
    @NotNull
    @ManyToOne(fetch=FetchType.EAGER)
    private EmployeeType empType;
    }


    EmployeeType {
    @Size(max=40)
    @Column(unique=true)
    private String name;
    }


    Both of them are Roo enabled entity class, any idea?

    Joseph
    Last edited by jlic; Jul 5th, 2010, 02:02 PM.

  • #2
    I tried also using the Roo shell to define the reference using the following command:

    field reference --fieldName empType --type com.temporal.domain.EmployeeType --notNull --joinColumnName emp_type_id --cardinality MANY_TO_ONE


    however, still getting the same error from the gui.

    Any help?

    Thanks,
    Joseph

    Comment


    • #3
      I read somewhere that field reference isn't still supported on GWT by Spring Roo 1.1.0.M2. I tried to find out where I read it, but I haven't found out yet.

      I will let you know if I find out the source

      Comment


      • #4
        Hi,

        Yes , U r Right. Reference Field and Set Field are not supported in Roo + GWT in Roo 1.1.0 M1. Perhaps it may be solved in Roo 1.1.0 M2. So wait, till this new Version Release.(May be in this week as per Released Date)

        Comment


        • #5
          Thanks guys, I will wait for M2 then. Its not too much of a problem for now, since I plan to make my own module and customize the gui differently anyway. I am still happy as long as the basic jpa mapping is working.

          Thanks,
          Joseph

          Comment


          • #6
            Originally posted by jlic View Post
            Thanks guys, I will wait for M2 then. Its not too much of a problem for now, since I plan to make my own module and customize the gui differently anyway. I am still happy as long as the basic jpa mapping is working.

            Thanks,
            Joseph
            Looks like you need to wait for M3?.. really like to have it sooner..
            Any way to workaround this? or steps to take to get relationship defined in Roo + GWT?


            https://jira.springsource.org/browse/ROO-889
            Duplicates:
            This issue is duplicated by:
            ROO-912 Roo task gwt:setup fails to generate SetRecord classes needed for MANY_TO_MANY relationships
            ROO-1079 Compilation error after performing "gwt setup" in roo
            ROO-902 GWT: Bidirectional relationships of referenced entities cause compiler errors
            Last edited by XuOne; Jul 11th, 2010, 10:51 AM.

            Comment


            • #7
              Thanks XuOne, I tried the M2 build as well and it doesn't look like it got fixed. Thanks.

              Joseph

              Comment


              • #8
                It's nice to know that you had it fixed.. Congrats Cheers,

                Scaffold

                Comment

                Working...
                X