-->
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: Informix and "A syntax error has occurred"
PostPosted: Thu Jun 04, 2009 7:47 am 
Newbie

Joined: Thu Feb 02, 2006 10:14 am
Posts: 9
Hi,

How to setup reverse engineering xml file to _NOT_ include schema and catalog information in @Table annotation?

My problem:

I'm using reverse engineering (in Seam) to generate hibernate entities from Informix database.

Whenever I'm trying to use entities I've got error:
Quote:
A syntax error has occurred


The problem is related with this part of query:
Code:
...
from
  myschema.mycatalog.mytable
...


if I edit my entity annotation from:
Code:
@Table(name = "mytable", schema = "myschema", catalog = "mycatalog")

to [removing schema and catalog]:
Code:
@Table(name = "mytable")


then it works fine.

Regards,
Adam.


Top
 Profile  
 
 Post subject: Re: Informix and "A syntax error has occurred"
PostPosted: Thu Jun 04, 2009 5:33 pm 
When you finish the interview by running 'seam setup' it saves your answers in the build.properties file in %SEAM_HOME%\seam-gen directory.

Code:
hibernate.default_catalog=
hibernate.default_schema=


IIRC, if you leave those blank, like above, then hbm2java will not add schema and catalog attributes to the @Table annotation for your entity classes.

You can modify the seam-gen build.properties file directly in Textpad (or similar tool) if you like rather than running 'seam setup' again.

Then run 'seam generate-entities'.

Give that a shot!


Top
  
 
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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.