-->
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.  [ 2 posts ] 
Author Message
 Post subject: SchemaExport not generates constraints if using property-ref
PostPosted: Wed Jan 07, 2004 8:19 am 
Beginner
Beginner

Joined: Fri Oct 10, 2003 10:30 am
Posts: 35
Location: Stockholm
Hi guys.
For a strange reason, I'm forced to define some many-to-one mappings not referring to the entity Id but to an other field. (very bad...I know:-)
For this reason I'm using property-ref to a unique property in the associated class.
I wonder though why the schema export doesn't generate any constraint for the column.
i.e:
without property-ref:
Code:
add constraint FK3A2DB58975C8AF8A foreign key (systemid) references system (id)

with property-ref on name I don't get any
Code:
add constraint FK3A2DB58975C8AF8A foreign key (systemname) references system (name)

as I would expect.
Any clue?
/roberto


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 07, 2004 8:39 am 
Beginner
Beginner

Joined: Fri Oct 10, 2003 10:30 am
Posts: 35
Location: Stockholm
besides,
the data type of the column is not the same of the referred column...
While system.name is varchar(6), systemname is a varchar(255), which is not acceptable
/roberto


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

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.