• 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

fk / pk constraint name

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to tell the ejb3 layer the name of constraints?

For example a PK's name will be something like SYS_C0000123 using oracle. Something like PK_TABLE_ID would be helpful, because when a insert statement violates the constraint, the db will tell me the constraint name.

Maybe its implemention specific - currently im using jboss AS for ejb3 persistence.

thanks,
Bernhard
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunately, you only get the Oracle name back. You can always have Oracle not automatically name the contraint for you and have your DDL give it a name, then you will see a nicer name.

This is an Oracle issue and not related to EJB or any App Server.

Mark
 
Bernhard Neuhauser
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are wrong, the issue has nothing to do with the chosen database.

This is mainly an ejb3 issue (or better said an issue of the mapper behind ejb3).

In my case, its hibernate. Hib generates the ddl based on the information taken from the ejb3 annotations. So the question is, how to tell the ejb3 layer to generate the ddl in a proper way.

cybi
 
reply
    Bookmark Topic Watch Topic
  • New Topic