-->
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: Schema generation not picking up JPA constraint annotations
PostPosted: Mon Dec 19, 2016 2:47 pm 
Newbie

Joined: Wed Nov 30, 2016 7:08 pm
Posts: 3
According to the docn "Out of the box, Hibernate (as of version 3.5.x) will translate the constraints you have defined for your entities into mapping metadata.". I'm using Hibernate 5.2.4.Final with Validator 5.2.4.Final and javax.validation 1.1.0.Final however my JPA constraint annotations are not being taken into account when the schema is generated. I've tried generating the schema using SchemaExport and Persistence.generateSchema. In both cases the JPA annotations are ignored. Any help would be much appreciated.


Top
 Profile  
 
 Post subject: Re: Schema generation not picking up JPA constraint annotations
PostPosted: Mon Jan 09, 2017 5:22 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Check out this StackOverflow answer for more details on what's taken into consideration for DDL and what's just Bean Validation-related constraints.


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.