Hi forum,
Does Hibernate support DDL statement execution, for eg; create database or create table statements?
I don't think HQL gives direct support for DDL, but can we not invoke Native SQL statements directly from Hibernate in the following way:
Code:
SQLQuery sql = session.createSQLQuery("create database " + dbName);
sql.executeUpdate();
However, in such a case I get an UnsupportedOperationException, because update operations are not allowed with SQLQuery objects!
Thanks in advance.
Regards,
Kumar Iyer.