Uploaded image for project: 'Hibernate ORM'
  1. HHH-11427

ImplicitNamingStrategyComponentPathImpl generates wrong column name

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.1.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      I have below entity. I expected "name" property mapped to "name" column. But hibernate generated wrong column name. If I use default naming strategy it works fine.

      Entity
      @IdClass(WebSiteModule.PK.class)
      @Table(name = "websiteModule")
      public class WebSiteModule implements Serializable {
      
          @Id
          private String name;
      
          @Id
          @ManyToOne 
          private WebSite site;
      
          public static class PK implements Serializable{
              private String name;
              private Integer site;
      
              public PK() {
      
              }
      
              public PK(String name, Integer site) {
                  this.name = name;
                  this.site = site;
              }
              
          }
      }
      
      select websitemod0_.id_name as id_name1_20_, websitemod0_.id_site_id as id_site_5_20_, websitemod0_._identifierMapper_name as _identif2_20_, websitemod0_._identifierMapper_site_id as _identif6_20_ 
      from websiteModule websitemod0_ 
      where websitemod0_._identifierMapper_site_id=?
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hurelhuyag HM
              Participants:
              HM
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: