Hibernate ORM
  1. Hibernate ORM
  2. HHH-8170

Deprecate Hibernate @ForeignKey in favor of JPA 2.1 introduced @ForeignKey annotation

    Details

    • Type: Deprecation Deprecation
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.0.Beta2
    • Component/s: annotations
    • Labels:
      None
    • Last commented by a user?:
      true

      Description

      Deprecate @org.hibernate.annotations.ForeignKey in favor of @javax.persistence.ForeignKey which was just introduced in JPA 2.1

        Activity

        Hide
        dvdgsng added a comment -

        @org.hibernate.annotations.ForeignKey allowed to change the generated foreign key name from the providers default implementation to a manually set name, like so: @org.hibernate.annotations.ForeignKey(name = "fk_foo_bar")

        What is the suggested equivalent when using @javax.persistence.ForeignKey?

        Show
        dvdgsng added a comment - @org.hibernate.annotations.ForeignKey allowed to change the generated foreign key name from the providers default implementation to a manually set name, like so: @org.hibernate.annotations.ForeignKey(name = "fk_foo_bar") What is the suggested equivalent when using @javax.persistence.ForeignKey?
        Hide
        Steve Ebersole added a comment -

        javax.persistence.ForeignKey#name

        Show
        Steve Ebersole added a comment - javax.persistence.ForeignKey#name
        Hide
        dvdgsng added a comment -

        Of course I've tried that (should've mentioned it) but the provider defaults are still used. Changing it to Hibernates annotation works.

        Are there any addition requirements for this to work?

        Show
        dvdgsng added a comment - Of course I've tried that (should've mentioned it) but the provider defaults are still used. Changing it to Hibernates annotation works. Are there any addition requirements for this to work?
        Hide
        Steve Ebersole added a comment -

        So to me, it sounds like you are reporting a bug? If so, please create a Jira and attach a test case.

        Show
        Steve Ebersole added a comment - So to me, it sounds like you are reporting a bug? If so, please create a Jira and attach a test case.
        Hide
        Brett Meyer added a comment -

        dvdgsng, what version of ORM are you seeing that happen? This area was corrected in multiple ways in later releases. If it's still happening, please open a new ticket and ping me.

        Show
        Brett Meyer added a comment - dvdgsng , what version of ORM are you seeing that happen? This area was corrected in multiple ways in later releases. If it's still happening, please open a new ticket and ping me.
        Hide
        dvdgsng added a comment -

        Version is 4.3.0.CR2. I could open a ticket, but I won't have time to provide a test example until next week.

        Show
        dvdgsng added a comment - Version is 4.3.0.CR2. I could open a ticket, but I won't have time to provide a test example until next week.
        Hide
        dvdgsng added a comment -
        Show
        dvdgsng added a comment - Created ticket https://hibernate.atlassian.net/browse/HHH-8783

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - Not Specified
              Not Specified
              Logged:
              Time Spent - 2m
              2m

                Development