-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Naming Strategy for Primary Key
PostPosted: Wed Mar 23, 2011 8:02 am 
Regular
Regular

Joined: Sun Apr 13, 2008 3:04 am
Posts: 71
Location: Bangalore
Hi,

I would like to apply pk_xx name for primary keys where xx is the table name. Is it possible to enforce such rule through curstom implementation of org.hibernate.cfg.NamingStrategy

If yes, which method is related to primary key naming which gives me the primary key name and the respective table name pl.

I am unable to find any special method for primary key naming.. For foreign key names this method exists

public String foreignKeyColumnName(final String aFieldName,
final String aClassName,
final String aFiledTableName,
final String aFKColumnName)

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com

_________________
Raja Nagendra Kumar,
C.T.O
http://www.tejasoft.com
TejaSoft - Specialists in Code Audit, Unit Testing and Merciless Re-factoring - Engineering Crisis Turnaround Experts


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.