Note that there are some explanatory texts on larger screens.

plurals
  1. POTable isn't created by hibernate's hbm2ddl
    primarykey
    data
    text
    <p>In my application I have several entity POJOs annotated with JPA annotations. Also hbm2ddl is configured to generate tables for these entities. When application starts first time, all tables are generated successfully except one. Here's entity source code:</p> <pre><code>import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity @Table(name = "REQUESTS") public class InterpreterRequest implements java.io.Serializable { private static final long serialVersionUID = -1017432073323298138L; @Id @GeneratedValue private long id; @Column(name = "quantity") private int quantity; @Column(name = "from") private String from; @Column(name = "to") private String to; @Column(name = "spec") private String spec; @ManyToOne(targetEntity = Event.class) private Event event; public long getId() { return id; } public void setId(long id) { this.id = id; } public int getQuantity() { return quantity; } public void setQuantity(int quantity) { this.quantity = quantity; } public String getFrom() { return from; } public void setFrom(String from) { this.from = from; } public String getTo() { return to; } public void setTo(String to) { this.to = to; } public String getSpec() { return spec; } public void setSpec(String spec) { this.spec = spec; } public Event getEvent() { return event; } public void setEvent(Event event) { this.event = event; } } </code></pre> <p>And here's hibernate session factory configuration:</p> <pre><code> &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt; &lt;property name="dataSource" ref="dataSource" /&gt; &lt;property name="hibernateProperties"&gt; &lt;props&gt; &lt;prop key="hibernate.hbm2ddl.auto"&gt;update&lt;/prop&gt; &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.H2Dialect&lt;/prop&gt; &lt;prop key="hibernate.connection.pool_size"&gt;5&lt;/prop&gt; &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt; &lt;prop key="hibernate.cglib.use_reflection_optimizer"&gt;true&lt;/prop&gt; &lt;!-- &lt;prop key="hibernate.cache.provider_class"&gt;org.hibernate.cache.EhCacheProvider&lt;/prop&gt; &lt;prop key="hibernate.hibernate.cache.use_query_cache"&gt;true&lt;/prop&gt; --&gt; &lt;/props&gt; &lt;/property&gt; &lt;property name="annotatedClasses"&gt; &lt;list&gt; &lt;value&gt;com.ceonline.inter.shared.model.User&lt;/value&gt; ... &lt;value&gt;com.ceonline.inter.shared.model.InterpreterRequest&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>What can be a reason for hbm2ddl to omit InterpreterRequest class when generating tables?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload