Ao fazer o exercícios: configurando e gerando o schema do banco da apostila da caelum fj21 o Meu hibernate esta gerando a seguinte tabela:
[code]create table Produto (
id bigint not null auto_increment,
descricao varchar(255),
nome varchar(255),
preco double precision not null,
primary key (id)
) type=InnoDB
[/code]
Mas meu SGBD mysql não esta aceitando o tipo: type=InnoDB, pois consigo criar essa tabela no mysql diretamente sem o paramatro type=InnoDB , Com isso meu hibernate não consegue criar essa tabela no meu mysql. Como corrigir isso no meu hibernate ou no meu mysql?
qual é a forma correta(padrão) para criar tabelas, com tipo ou sem tipo?
Mensagem de erro no Console:
[code]09:41:11 INFO [Version ] Hibernate Annotations 3.5.0-Final
09:41:11 INFO [Environment ] Hibernate 3.5.0-Final
09:41:11 INFO [Environment ] loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.connection.password=, hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect, hibernate.show_sql=true, hibernate.connection.url=jdbc:mysql://localhost/test, hibernate.bytecode.use_reflection_optimizer=false, hibernate.connection.driver_class=com.mysql.jdbc.Driver, hibernate.format_sql=true}
09:41:11 INFO [Environment ] Bytecode provider name : javassist
09:41:11 INFO [Environment ] using JDK 1.4 java.sql.Timestamp handling
09:41:11 INFO [Version ] Hibernate Commons Annotations 3.2.0.Final
09:41:11 INFO [Dialect ] Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
09:41:11 INFO [AnnotationBinder ] Binding entity from annotated class: br.com.caelum.hibernate.Produto
09:41:11 INFO [EntityBinder ] Bind entity br.com.caelum.hibernate.Produto on table Produto
09:41:11 INFO [AnnotationConfiguration] Hibernate Validator not found: ignoring
09:41:11 INFO [SchemaExport ] Running hbm2ddl schema export
09:41:11 INFO [SchemaExport ] exporting generated schema to database
09:41:11 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
09:41:11 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 20
09:41:11 INFO [DriverManagerConnectionProvider] autocommit mode: false
09:41:11 INFO [DriverManagerConnectionProvider] using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/test
09:41:11 INFO [DriverManagerConnectionProvider] connection properties: {user=root, password=}
drop table if exists Produto
create table Produto (
id bigint not null auto_increment,
descricao varchar(255),
nome varchar(255),
preco double precision not null,
primary key (id)
) type=InnoDB
09:41:11 ERROR [SchemaExport ] Unsuccessful: create table Produto (id bigint not null auto_increment, descricao varchar(255), nome varchar(255), preco double precision not null, primary key (id)) type=InnoDB
09:41:11 ERROR [SchemaExport ] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘type=InnoDB’ at line 1
09:41:11 INFO [SchemaExport ] schema export complete
09:41:11 INFO [DriverManagerConnectionProvider] cleaning up connection pool: jdbc:mysql://localhost/test
[/code]
Aguardo respostas, desde já gradeço.