Hello,
j'ai un petit probleme, Hibernate me créer un DDL bizare pour crée le schema, voila les infos :
et le fichier de configuration hibernate :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 INFO: Running hbm2ddl schema export 24 sept. 2008 20:50:15 org.hibernate.tool.hbm2ddl.SchemaExport execute INFO: exporting generated schema to database 24 sept. 2008 20:50:15 org.hibernate.tool.hbm2ddl.SchemaExport create GRAVE: Unsuccessful: create table Products (id integer generated by default as identity (start with 1), shortname varchar(255), longname varchar(255), barcode varchar(255), buyprice float, sellprice float, taxe float, primary key (id)) 24 sept. 2008 20:50:15 org.hibernate.tool.hbm2ddl.SchemaExport create GRAVE: ERROR: syntax error at or near "generated" 24 sept. 2008 20:50:15 org.hibernate.tool.hbm2ddl.SchemaExport execute INFO: schema export complete
Impossible de savoir pourquoi j'ai cette requête bizarre, qui bien sure n'est pas compatible postgresql,
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> <property name="hibernate.connection.url">jdbc:postgresql://localhost/kedare</property> <property name="hibernate.connection.username">kedare</property> <property name="hibernate.connection.password">____</property> <!-- JDBC connection pool (use the built-in) --> <property name="connection.pool_size">1</property> <!-- SQL dialect --> <property name="dialect">org.hibernate.dialect.HSQLDialect</property> <!-- Enable Hibernate's automatic session context management --> <property name="current_session_context_class">thread</property> <!-- Disable the second-level cache --> <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> <!-- Echo all executed SQL to stdout --> <property name="show_sql">true</property> <!-- Drop and re-create the database schema on startup --> <property name="hbm2ddl.auto">create</property> <mapping resource="jstock/Product.hbm.xml"/> </session-factory> </hibernate-configuration>
voila j'espère que vous pourrez m'aider,
merci
Partager