Spring-iBatis create database dynamically
I am new to spring-iBatis. I have a requirement to create a database dynamically from my application. The database is MySql. I have seen that there are methods for insert,update and delete like SQLM开发者_如何学运维ap.insert(). but I am not finding any method to execute Create statement. Can anyone help me ?
Try using Abator to assist in your code generation.
Hibernate can create a schema for you, because it takes information from objects and mappings and creates tables for you.
iBatis doesn't have the information about tables from mappings; you give it SQL to work with tables that are presumed to exist.
I'd recommend that you add SQL CREATE TABLE statements to a script and execute it with MySQL to create your schema. It should be complete by the time you start with Java and iBatis.
精彩评论