-->
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.  [ 9 posts ] 
Author Message
 Post subject: help me: very urgency!
PostPosted: Tue Jun 15, 2004 5:35 am 
Newbie

Joined: Tue Feb 03, 2004 3:03 am
Posts: 12
I use the hibernate2.1.3 ,the db is oracle9i.first i using the session.save(obj), then i using the session.find ,it can display the object that i inserted ,but when I using the sqlplus to connection the oralce,execute the sql:select * from cat,no record to find,why?
but when using the mysql db,it's fine,why?
help me,plz,thk!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 15, 2004 5:47 am 
Newbie

Joined: Tue Jun 08, 2004 12:04 am
Posts: 12
Did you even commit? (either auto or manual)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 15, 2004 6:18 am 
Newbie

Joined: Tue Feb 03, 2004 3:03 am
Posts: 12
yes,I do it with session.flush()


Top
 Profile  
 
 Post subject: cat is specific on oracle
PostPosted: Tue Jun 15, 2004 6:29 am 
Regular
Regular

Joined: Fri Nov 21, 2003 10:23 am
Posts: 81
select * from cat; - is specific select on oracle db, cat returns list of tables that you have in your schema on oracle. Are you sure you are not mixing it with your table? (cat is your table?)


Top
 Profile  
 
 Post subject: try
PostPosted: Tue Jun 15, 2004 6:31 am 
Regular
Regular

Joined: Fri Nov 21, 2003 10:23 am
Posts: 81
in SQL plus try:

Code:
select * from schema_name.cat


schema_name is probably your user_name...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 15, 2004 6:39 am 
Newbie

Joined: Tue Feb 03, 2004 3:03 am
Posts: 12
yes,cat is my table.
execute desc cat it display the cat table define:
CAT_ID NOT NULL VARCHAR2(32)
NAME NOT NULL VARCHAR2(16)
SEX NOT NULL VARCHAR2(1)
WEIGHT NOT NULL NUMBER(10,2)

I using the ownter of table to connect the oracle,so do'nt need to add the schema , envn add ,it don't work .


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 15, 2004 6:42 am 
Newbie

Joined: Tue Feb 03, 2004 3:03 am
Posts: 12
I think the cause is the ehcache, in the frist I can't add the cache,but the initial of hibennate has some wrong,so I add the ehcache.jar to my classpath.
is it any method to set that do'nt using the cache in the hibernate.cfg.xml?
thk very much!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 15, 2004 7:51 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Quote:
yes,I do it with session.flush()


this doesn't commit!!!

1- beginTx
2- do your job
3- optionnal if flushMode = auto, session.flush
4- commitTx

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 1:15 am 
Newbie

Joined: Tue Jun 08, 2004 12:04 am
Posts: 12
:) As I suspected.....


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