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?