Hi there,
this is my first post ever in the forum. Nice to meet you all.
How do I change the Queries created by the SchemaGenerator class? I got a really simple JDBC Driver ( don't even support the NOT NULL statement) that can't parse the regular queries. I want to use the hbm2dll feature of Hibernate but it need to be compatible with my simplistic DBM.
I created my own dialect that resolved some of the incompatibilities (like supported sql types and functions) but I still need to do a lot of customization.
Here is the error that I'm getting.
Code:
ERROR SchemaExport:114 - Unsuccessful: create table MESSAGES (MESSAGE_ID integer not null, MESSAGE_TEXT varchar, NEXT_MESSAGE_ID integer, primary key (MESSAGE_ID))
[java] ERROR SchemaExport:114 - Error in statement [create table MESSAGES (MESSAGE_ID integer not null, MESSAGE_TEXT varchar, NEXT_MESSAGE_ID integer, primary key (MESSAGE_ID))]; Cause: com.j_spaces.jdbc.parser.grammar.ParseException: Encountered " "not" "not "" at line 1, column 43.
[java] Was expecting one of:
[java] "default null" ...
[java] "index" ...
[java] "primary key" ...
[java] ")" ...
[java] "," ...
This query is generated by the method 'sqlCreateString(Dialect dialect, Mapping p, String defaultCatalog, String defaultSchema)' in 'org.hibernate.mapping.Table'.
Do I have to subclass it and implement my own method? But then I would need to chance the class 'org.hibernate.cfg.Configuration' as well and so on all the way up.
Is there a easier way to do it?
My libs versions.
Code:
[java] INFO Version:94 - Hibernate EntityManager 3.2.0.CR1
[java] INFO Version:94 - Hibernate Annotations 3.2.0.CR1
[java] INFO Environment:94 - Hibernate 3.2 cr2
Thank you very much in advance.