-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: hbm2ddl SchemaExport : ERROR Syntax error in field def
PostPosted: Sun Jan 18, 2009 3:10 pm 
Newbie

Joined: Thu Jan 15, 2009 1:07 pm
Posts: 2
Hi there

I was trying to figure this problem for long time but no success.
I could make NHibernate 2.0 interact with an existing simple Ms-Access DB
But when it comes to generate the schema for it using the hbm2ddl, I get in a problem that i don't understand.

Here is the log from log4net:
Code:
2009-01-18 00:14:17,625 DEBUG create table NHBM.User (LogonId INT !!! REPLACE THE PRECEEDING 'INT' AND THIS PLACEHOLDER WITH 'COUNTER' !!!, Name TEXT($1) null, [Password] TEXT($1) null, EmailAddress TEXT($1) null, LastLogon DATETIME null, primary key (LogonId))
2009-01-18 00:14:17,625 WARN Unsuccessful: create table NHBM.User (LogonId INT !!! REPLACE THE PRECEEDING 'INT' AND THIS PLACEHOLDER WITH 'COUNTER' !!!, Name TEXT($1) null, [Password] TEXT($1) null, EmailAddress TEXT($1) null, LastLogon DATETIME null, primary key (LogonId))
2009-01-18 00:14:17,625 WARN Syntax error in field definition.
2009-01-18 00:14:17,625 ERROR Syntax error in field definition.
System.Data.OleDb.OleDbException: Syntax error in field definition.
   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)


But when i take the generated script and run it myself in another app, it works fjust fine

Do you have any idea?

Thx


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 18, 2009 6:26 pm 
Newbie

Joined: Thu Jan 15, 2009 1:07 pm
Posts: 2
Ok guys,

I found out that the length attribute on properties is the issue.
If I ignore that attribute then it works fine.

I think there is a problem that NHibernate.JetDriver doesn't revaluate the parameter specified in the length attribute before executing the DDL and exporting the schema


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.