-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: invalid column name
PostPosted: Fri Mar 26, 2004 8:18 am 
Newbie

Joined: Fri Mar 26, 2004 8:02 am
Posts: 3
Hi all,
I have a problem with a simple query, Oracle Db. The java code is:
String query = "from it.app.iniziative.Esigenza where id = 1";

the mapping file is:

<class name="it.app.iniziative.Esigenza" table="PI_REQUIREMENTS">

<id name="id" type="int" unsaved-value="null" >
<column name="KCODE" sql-type="number(12)" not-null="true"/>
<generator class="sequence" >
<param name="sequence">s_requirements</param>
</generator>
</id>
<property name="sourceCode" >
<column name="SOURCE_CODE" sql-type="number(2)" />
</property>
<property name="codice" >
<column name="CODE" />
</property>
<property name="description">
<column name="DESCRIPTION" />
</property>


The log file returns:
INFO [http8070-Processor8] impl.SessionFactoryImpl - Query language substitutions: {}
WARN [http8070-Processor8] util.JDBCExceptionReporter - SQL Error: 904, SQLState: 42000
ERROR [http8070-Processor8] util.JDBCExceptionReporter - ORA-00904: invalid column name
ERROR [http8070-Processor8] util.JDBCExceptionReporter - Could not execute query


I've been trying with all columns of the table, but there is the same problem!
Could anyone help me?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 26, 2004 9:12 am 
Beginner
Beginner

Joined: Wed Mar 17, 2004 12:44 am
Posts: 25
turn on show_sql in hibernate properties and see the sql where it is giving error.

nitin


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.