Announcement Announcement Module
Collapse
No announcement yet.
[ERROR] intertype declaration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [ERROR] intertype declaration

    Hi!

    I'm newbie in Spring and I'm try to use Spring Roo (1.2) to start a new simple project form the scratch

    Very basic, two tables with one relationship

    Code:
    entity jpa --class ~.domain.Companies --table COMPANIES --testAutomatically
    field number --fieldName Id --notNull --type java.lang.Long
    field string --fieldName Name --notNull --sizeMax 50
    
    entity jpa --class ~.domain.Users --table USERS --testAutomatically
    field number --fieldName Id --notNull --type java.lang.Long
    field string --fieldName Name --notNull --sizeMax 50
    field set --fieldName IdCompany --type ~.domain.Companies
    Executing "perform test" I obtain errors like this:

    Code:
    [INFO] --- aspectj-maven-plugin:1.2:compile (default) @ portalpymes ---
    [ERROR] intertype declaration from com.foo.domain.Use
    rs_Roo_JavaBean conflicts with intertype declaration: java.lang.Long com.foo.domain.Users.getId() from com.foo.domain.Users_Roo_Jpa_Entity
    I can't find information about the error on Google.
    Any help?

  • #2
    Spring roo auto generate id field. You can check file Users_Roo_Jpa_Entity.aj in any editor (file is located in the same directory as Java file, eclipse does'n show it because it's configured that way)

    Comment


    • #3
      Thanks for the reply.
      Spring Roo auto-generated the Id fields for each table, so I don't need to create manually the ids.

      Comment

      Working...
      X