Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1409

DBRE should mark repeated column mapping as non-insertable/non-updatable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.0.RC1
    • Fix Version/s: 1.1.0.RC1
    • Component/s: PERSISTENCE
    • Labels:
      None

      Description

      If column already is in use to declare join via

      ...
      @JoinColumn(name = "columnX", referencedColumnName = "columnX") 
      ...
      

      all consequences uses of the same column in join have to be annotated to be "non-insertable/non-updatable", i.e.

          @ManyToOne
          @JoinColumns({ 
      		@JoinColumn(name = "column0", referencedColumnName = "column0"), 
      		@JoinColumn(name = "column1", referencedColumnName = "column1"), 
      		@JoinColumn(name = "column2", referencedColumnName = "column2") 
      	})
          private EntityX ...;
          
          @ManyToOne
          @JoinColumn(name = "column0", referencedColumnName = "column0", insertable=false, updatable=false)
          private EntityY ...;
      

        Attachments

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            romankuzmik Roman Kuzmik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: