-->
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.  [ 3 posts ] 
Author Message
 Post subject: hbm2ddl
PostPosted: Sun Jun 20, 2010 2:30 pm 
Newbie

Joined: Mon Jun 13, 2005 9:29 am
Posts: 8
Hello,

I'm working on simple application with Spring, JPA (Hibernate) and Apache Derby. All my entyties are definied with annotations. Because I'm using maven dependency management I would like to create the ddl for Apache Derby with the hbm2ddl plugin. Basically no problem. But I've realised that no unique constraints are created. Regardless if I define it with the @UniqueConstraint or the @NaturalId annotation. Even properties with the @NotNull annotation are not null. But all the 'create table'-statements are created correctly. I'm using the following configuration for the hbm2ddl plugin:

Code:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<dependencies>
...
</dependencies>
<executions>
<execution>
  <phase>compile</phase>
  <goals>
   <goal>hbm2ddl</goal>
  </goals>
</execution>
</executions>
<configuration>
<components>
  <component>
   <name>hbm2ddl</name>
   <implementation>annotationconfiguration</implementation>
</component>
<componentProperties>
   <persistenceunit>XXX</persistenceunit>
   <outputfilename>db-schema.sql</outputfilename>
   <propertyfile>hbm2ddl.properties</propertyfile>
   <implementation>annotationconfiguration</implementation>
   <scan-classes>true</scan-classes>
   <jdk5>true</jdk5>
   <ejb3>true</ejb3>
   <drop>true</drop>
   <create>true</create>
   <export>true</export>
   <format>true</format>
   <haltonerror>true</haltonerror>
</componentProperties>
</configuration>
</plugin>


Thank you
Lothar


Top
 Profile  
 
 Post subject: Re: hbm2ddl
PostPosted: Mon Jun 21, 2010 1:12 pm 
Newbie

Joined: Mon Jun 13, 2005 9:29 am
Posts: 8
Does nowbody know the reason or solution for the problem ?

Lothar


Top
 Profile  
 
 Post subject: Re: hbm2ddl
PostPosted: Tue Jun 29, 2010 5:52 am 
Newbie

Joined: Tue Jun 29, 2010 5:45 am
Posts: 1
Sorry i am helpless...I only know webtechnologies like JSP, ASP etc & i am not keen in Apache..

_________________
http://www.funnyhilariousquotes.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.