jpa - could not determine type for: com.model.User, for columns: [org.hibernate.mapping.Column(user)] -


although question asked many times , have used suggestion still getting error. not determine type for: com.model.user, columns: [org.hibernate.mapping.column(user)] , tn

hibernate.cfg.xml configuration

<?xml version="1.0" encoding="utf-8"?> <!doctype hibernate-configuration public     "-//hibernate/hibernate configuration dtd//en"     "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">    <hibernate-configuration>   <session-factory>     <property name= "connection.driver_class">com.mysql.jdbc.driver</property>     <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/covoiturage</property>    <property name="hibernate.connection.username">root</property>     <property name="hibernate.connection.password"></property>        <property name="hibernate connection.pool_size">1</property>     <property name="show_sql">true</property>     <property name="hibernate.dialect">org.hibernate.dialect.mysqldialect</property>     <property name="hibernate.hbm2ddl.auto">create</property>  <mapping class="com.model.messagerie"/>     <mapping class="com.model.trajet"/>     <mapping class="com.model.user"/>     <mapping class="com.model.voiture"/>      </session-factory> </hibernate-configuration> 

user.java

@entity @table(name="user") public class user{      @id      @generatedvalue(strategy=generationtype.identity)     @column(name="iduser")     private int iduser;      @manytoone     @joincolumn(name="idvoiture", nullable=false)     private voiture voit;              *              *              *              *     public voiture getvoiture() {         return voit;     }      public void setvoiture(voiture voiture) {         this.voit = voiture;     }   } 

voiture.java

@entity @table(name="voiture") public class voiture{      @id       @generatedvalue(strategy=generationtype.identity)     @column(name="idvoiture")     private int idvoiture;      @onetomany(mappedby = "voit", cascade = cascadetype.all)     private list<user> listeusers;              *              *              * public list<user> getlisteusers() {         return listeusers;     }      public void setlisteusers(list<user> listeusers) {         this.listeusers = listeusers;     } 


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -