-->
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: DDL generation using validation constraints
PostPosted: Mon Jun 06, 2011 8:33 am 
Newbie

Joined: Fri Aug 27, 2010 11:55 am
Posts: 2
Trying to take a look at Bean Validation, I have substituted many of the JPA annotations with BV annotations in a project. However, the generated database schema does not match.

One of the problems is that it does not work with element collections. The resulting columns do not have any of the specified constraints.

Taking a look at the Hibernate code (not that I have much idea) I have found "org.hibernate.cfg.beanvalidation.TypeSafeActivator". There, in "private static void applyDDL(String prefix, ..." there is a comment that says "//FIXME add collection of components" (github link). So, may be, DDL generation is not fully supported a this time?

I have also spotted more differences (although they might be my fault):
  • All columns of an Embedded are set to not null when nor the Embedded attribute nor the Embeddable attributes are annotated with @NotNull.
  • A simple String attribute only annotated with @Digits is set as not null.
  • Some join columns are nullable even with @NotNull annotations.


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.