-->
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: How to set preparedStatement with BatchBuilder in Hibernate
PostPosted: Wed Mar 05, 2014 8:57 am 
Newbie

Joined: Mon Apr 30, 2007 10:58 am
Posts: 5
Hi,

currently I'm migrating a persistence wrapper from Hibernate 3.2.3 to 4.3.1. Most of the work is already done. But now I have a problem to migrate the Persister classes of our wrapper.

We are using s.th. like that in our EntityPersister in the delete() method for exmaple:
Code:
            //Render the SQL query
            PreparedStatement delete;
            if (useBatch)
            {
                if (callable)
                {
                    delete = session.getBatcher().prepareBatchCallableStatement(sql);
                }
                else
                {
                    delete = session.getBatcher().prepareBatchStatement(sql);
                }
            }
            else
            {
                if (callable)
                {
                    delete = session.getBatcher().prepareCallableStatement(sql);
                }
                else
                {
                    delete = session.getBatcher().prepareStatement(sql);
                }
            }


But what is the correct way to implement that in Hibernate 4? I've searched already if there is any documentation but haven't found any example or a documentation which explain that more in detail :-(.

Anybody who can help?

Reagrds,
Michael


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.