-->
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.  [ 1 post ] 
Author Message
 Post subject: Help with Oracle Stored Procedure
PostPosted: Wed May 02, 2007 4:51 pm 
Newbie

Joined: Wed May 02, 2007 3:32 pm
Posts: 1
Problem with Oracle Stored Procedure. Getting "no natural-id property defined; need to specify [key] in generator parameters" error from org.hibernate.id.IdentifierGenerationException Basically need to load table data into memory for future reference. Any help greatly appreciated

[b]Version: 3.2.3[/b]

[b]<hibernate-mapping>
<class name="Source" table="SOURCE">
<!--Properties Mapping-->
<id name="SourceId" type="int">
<column name="SOURCE_ID"/>
<generator class="select"/>
</id>
<property name="SourceName" insert="false" update="false" type="java.lang.String">
<column name="SOURCE_NAME"/>
</property>
<property name="SourceDesc" insert="false" update="false" type="java.lang.String">
<column name="SOURCE_DESC"/>
</property>
</class>
</hibernate-mapping>

<hibernate-mapping>
<sql-query name="selectAllSource_FNC">
<return alias="source" class="Source">
<return-property name="SourceId" column="SOURCE_ID"/>
<return-property name="SourceName" column="SOURCE_NAME"/>
<return-property name="SourceDesc" column="SOURCE_DESC"/>
</return>
{ ? = call DATA.FNC_GET_ALL_SOURCE() }
</sql-query>
</hibernate-mapping>
[/b]


[b]org.hibernate.id.IdentifierGenerationException: no natural-id property defined; need to specify [key] in generator parameters
at org.hibernate.id.SelectGenerator.determineNameOfPropertyToUse(SelectGenerator.java:50)
at org.hibernate.id.SelectGenerator.access$100(SelectGenerator.java:29)
at org.hibernate.id.SelectGenerator$SelectGeneratorDelegate.<init>(SelectGenerator.java:94)
at org.hibernate.id.SelectGenerator$SelectGeneratorDelegate.<init>(SelectGenerator.java:75)
at org.hibernate.id.SelectGenerator.getInsertGeneratedIdentifierDelegate(SelectGenerator.java:41)
at org.hibernate.persister.entity.AbstractEntityPersister.postConstruct(AbstractEntityPersister.java:2961)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:409)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)[/b]


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

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.