requête (lancée à l'aide de l'objet session d'hibernate) :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
session.find("select o from Systeme o order by o.name")
de l'aide svp?

interprétation :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
Hibernate: select systeme0_.id as id, systeme0_.name as name from application systeme0_ where systeme0_.class='business.systeme.Systeme' order by  systeme0_.name
12:18:56,212  WARN JDBCExceptionReporter.logExceptions():38 - SQL Error: 904, SQLState: 42000
12:18:56,212 ERROR JDBCExceptionReporter.logExceptions():46 - ORA-00904: "SYSTEME0_"."CLASS": invalid identifier
Pour info :

conf :
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
 
<?xml version="1.0"?>
<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 2.0//EN"
	"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
	<session-factory>
        <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
        <property name="connection.url">jdbc:oracle:thin:@blabla</property>
        <property name="connection.username">user</property>
        <property name="connection.password">pass</property>
        <property name="show_sql">true</property>
        <property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
        <property name="c3p0.min_size">5</property>
        <property name="c3p0.max_size">20</property>
        <property name="c3p0.timeout">1800</property>
        <property name="c3p0.max_statements">50</property>
        <property name="default_schema">MONSCHEMA</property> 
        <mapping resource="mapping.hbm.xml"/>
    </session-factory>
</hibernate-configuration>
mapping (partie concernée)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
	<class name="business.hibernate.HbSysteme" table="application">
		<id name="id" column="id" type="int">
			<generator class="net.sf.hibernate.id.TableHiLoGenerator">
				<param name="table">uid_table</param>
				<param name="column">next_hi</param>
			</generator>
		</id>
		<discriminator/>
		<property name="name" column="name" type="string" not-null="true" unique="true"/>
		<subclass name="business.systeme.Systeme"/>
	</class>