Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-397

PersistencePlugin does not mark one side of a OneToOne as 'mappedBy'

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 1.0.0.Beta4
    • None
    • None
    • None

    Description

      The PersistencePlugin currently generates OneToOne relationships like this:

      @OneToOne
      private Profile profile;

      public Profile getProfile()

      { return this.profile; }

      public void setProfile(final Profile profile)

      { this.profile = profile; }

      ...and...

      @OneToOne
      private Customer customer;

      public Customer getCustomer()

      { return this.customer; }

      public void setCustomer(final Customer customer) { this.customer = customer; }

      Ideally one side of the relationship should be marked as the 'inverse':

      @OneToOne(mappedBy="profile")
      private Customer customer;

      public Customer getCustomer() { return this.customer; }

      public void setCustomer(final Customer customer)

      { this.customer = customer; }

      Attachments

        Activity

          People

            lincolnthree Lincoln Baxter III (Inactive)
            kennardconsulting Richard Kennard (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: