-->
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: MySQL: Hibernate doesn't generate all tables of schema
PostPosted: Wed Sep 22, 2010 6:28 am 
Newbie

Joined: Mon Aug 23, 2010 6:34 am
Posts: 6
Hi!

I am using hibernate 3.3.2 and MySQL Server 5.0 and have the following problem:

I want to let hibernate generate my schema via "hibernate.hbm2ddl.auto".
Some tables are created, but not all.
For example, one table for an OneToMany relation is defined like
Code:
@OneToMany(targetEntity=ZielStrukturWohnung.class, cascade = CascadeType.ALL)
    @JoinTable(
            name="ZIELGEB_ZIELWOHN",
            joinColumns = @JoinColumn(name = "zielgeb_id"),
            inverseJoinColumns = @JoinColumn(name = "zielwohn_id"))
     private List<ZielStrukturWohnung> wohnungen = new ArrayList<ZielStrukturWohnung>();

and is created as expected.

Anotherone is defined like
Code:
@OneToMany(targetEntity=RohdatenErhebungseinheit.class)
    @JoinTable(
            name="ZIELGEB_ROHDATEN",
            joinColumns = @JoinColumn(name = "zielgeb_id"),
            inverseJoinColumns = {@JoinColumn(name = "GEBID", referencedColumnName = "GEBID"),
                                                        @JoinColumn(name = "AID", referencedColumnName = "AID")
                                                    })   
    private List<RohdatenErhebungseinheit> rohdatensaetze = new ArrayList<RohdatenErhebungseinheit>();


and isn't created.

With Oracle everything works fine, so I guess the annotations are correct.
Are there any known issues with schema generation under MySQL?


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.