[hibernate-dev] Named Prepared Statements

Igor Chubin igor at chub.in
Sun Jan 26 14:28:57 EST 2014


Hallo list,

I'm writing a Hibernate-dialect for a DBMS, and I can't understand
what is the best way to do some things.

One of my questions:

How can I configure in the dialect, that it must/must not use
named prepared statements.

For example, I have this in HQL:

    Query query = session.createQuery("update Student set studentName = :studentName" + " where studentId = :studentId");
    query.setParameter("studentName", "Jack");
    query.setParameter("studentId", 1);

And in resulting SQL:

    update tutorials.student set STUDENT_NAME=? where STUDENT_ID=?

Is it posible to use named prepared statements in the resulting SQL?
And opposite: how do I say that my DBMS doesn't support prepared
statements?

Thank you very much!

-- 
Igor Chubin



More information about the hibernate-dev mailing list