• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Naming strategy

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hibernate gurus,
I have a question on hibernate naming strategy. For table names and column names hibernate creates table names and column names with underscores. but for order by attribute on collection properties a hql query returns with column name not found.
e.g. if a person has multiple addresses, and in the person object you have the order-by set to countryName in the one-to-many mapping to Address class, when i creates the schema, the field name is COUNTRY_NAME, but when i lazily load the address collection on person, which is when it gets the collection of Address objects and order it by COUNTRY_NAME, but it says column ADDRESS0.COUNTRYNAME not found. notice the missing underscore in the column name!
So my quess is that the naming strategy is not processing the order-by attribute at all.
Is that a bug?
 
reply
    Bookmark Topic Watch Topic
  • New Topic