-->
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.  [ 6 posts ] 
Author Message
 Post subject: PreparedStatement of mapped Class
PostPosted: Wed Dec 14, 2005 6:50 am 
Newbie

Joined: Wed Dec 14, 2005 6:35 am
Posts: 3
Hi everyone,
i'd like to know if there is a way to get the preparedstatements that hibernate use to insert/update/delete mapped class.
In pratice, i suppose that hibernate caches statements of mapped class to do insert/update/delete operations, and i need them.
Is it possible?
I've tried to look for org.hibernate.*, org.hibernate.cache.*, org.hibernate.impl.* packages, but i've found nothing.

Thanks everyone!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 14, 2005 6:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you mean the sql or the actual PreparedStatement instances ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 14, 2005 7:07 am 
Newbie

Joined: Wed Dec 14, 2005 6:35 am
Posts: 3
max wrote:
you mean the sql or the actual PreparedStatement instances ?


Hi Max,
excuse me but i don't understand; i mean the PreparedStatement that Hibernate should use when i do session.save(myObject), or session.update(myObject), for example.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 14, 2005 7:11 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
all PreparedStatements is created via the AbstractBatcher and its subclasses.

The actual pre-generated sql is available in AbstractEntityPersister

What do you need the PreparedStatement for ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 14, 2005 7:26 am 
Newbie

Joined: Wed Dec 14, 2005 6:35 am
Posts: 3
max wrote:
all PreparedStatements is created via the AbstractBatcher and its subclasses.

The actual pre-generated sql is available in AbstractEntityPersister

What do you need the PreparedStatement for ?


Thanks a lot for your help!

I'm working in developing team that is using Hibernate since April and we encountered some performances problems while inserting a large amounts of objects, (we can't use batch-size <> 0 with Oracle DB); so i've thinked to create a Batcher that uses PreparedStatement of mapped classes to do CRUD operations.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 14, 2005 7:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use StatelessSession for higher batch insert performance.

And what is the difference between the batcher you want and the batcher there already exists in Hibernate ? Just using PreparedStatements dosen't solve anything since that is always used anyhow.

_________________
Max
Don't forget to rate


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