-->
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.  [ 4 posts ] 
Author Message
 Post subject: error relation hibernate_sequence not found??
PostPosted: Tue Sep 07, 2004 2:29 am 
Newbie

Joined: Mon Aug 09, 2004 8:31 am
Posts: 8
Location: dijon
hello,

I am starting with hibernate. Here is the error I got when launching client. Is anyone could tell me what's happening!

Hibernate version:2.1

Mapping documents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.champion.hibernate.POJOPersonnes" table="personnes" schema="public">
<id name="idPersonne" column="id_personne" type="long">
<generator class="native"/>
</id>
<property name="nom" column="nom" type="string" length="50"/>
<property name="prenom" column="prenom" type="string" length="30"/>
<property name="dateNaissance" column="date_naissance" type="date" length="4"/>
<property name="sexe" column="sexe" type="string" length="1"/>
</class>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():

Configuration cfg=new net.sf.hibernate.cfg.Configuration()
.addClass(POJOPersonnes.class);
SessionFactory ssFactory=cfg.buildSessionFactory();
//ouverture de la session
ss=ssFactory.openSession();

//cr


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 12:02 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
check, the sequence generator parameters

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 08, 2004 3:15 am 
Newbie

Joined: Mon Aug 09, 2004 8:31 am
Posts: 8
Location: dijon
are you taking about the <generator class="native"> in the mapping file?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 08, 2004 5:33 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Kind of, native means native to the DB. In postgres, this is equivalent to sequence.
Set the correcpt parameters as explained in
http://www.hibernate.org/hib_docs/reference/en/html_single/#mapping-declaration-id-sequences

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.