Java EE Hibernate inserts only ? values in my postgresql database -


i'm trying hibernate send java ee entities in postgresql database using ejb. entity code (for testing, use simplest one) :

  import java.io.serializable;  @entity  public class coup implements serializable {      private static final long serialversionuid = 1l;      @column(unique=true, nullable=false)     @id     private string name;      @column(nullable=false)     private string jeu;      public coup() {     }      public coup(string name, string jeu) {         this.name = name;         this.jeu = jeu;     }      public string getname() {         return this.name;     }      public void setname(string name) {         this.name = name;     }      public string getjeu() {         return this.jeu;     }      public void setjeu(string jeu) {         this.jeu = jeu;     }  }  

and hibernate.xml file is

<?xml version="1.0" encoding="utf-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">   <persistence-unit name="postgresdsjeeux" transaction-type="jta">     <provider>org.hibernate.ejb.hibernatepersistence</provider>     <jta-data-source>java:/postgresdsjeeux</jta-data-source>     <class>equipe</class>     <class>joueur</class>     <class>salon</class>     <class>partie</class>     <class>hautfait</class>     <class>coup</class>     <properties>      <!-- <property name="hibernate.connection.driver_class" value="org.postgresql.driver"/>  -->         <property name="hibernate.hbm2ddl.auto" value="create-drop"/>       <property name="hibernate.show_sql" value="true" />     <!-- <property name="transaction.factory_class" value="org.hibernate.transaction.jdbctransactionfactory" /> -->       </properties>   </persistence-unit> </persistence> 

however, after execute

             coup c = new coup();             c.setjeu("superjeu");             c.setname("supername");                 em.persist(c); 

code, generated query see in jboss6 log :

14:57:59,364 info  [stdout] hibernate: insert coup (jeu, name) values (?, ?) 

thanks answer might provide.

i think that's logging message preparedstatement show bound parameters.

did in database see inserted? that's thing matters, not log.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -