-->
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.  [ 3 posts ] 
Author Message
 Post subject: error in eg example with McKoi
PostPosted: Tue Dec 16, 2003 3:05 am 
Newbie

Joined: Tue Dec 16, 2003 2:55 am
Posts: 3
I'm using Hibernate 2.1 (for the first time) with Mckoi 1.0.2 and running the included eg example. Problems are occuring whenever the select statement encounters quotes around field names. For example: this."password". See below (more details can be provided if necessary).

[java] Viewing user and auctions: 1

[java] Hibernate: select this.id as id1_, this.userName as userName1_, this."password" as y3_1_, this.email as email1_, this.firstName as firstName1_, this."initial" as y6_1_, this.lastName as lastName1_, auctions1_.id as id__, auctions1_.seller as seller__, auctions1_.id as id0_, auctions1_.description as descript2_0_, auctions1_.ends as ends0_, auctions1_.condition as condition0_, auctions1_.seller as seller0_, auctions1_.successfulBid as successf6_0_ from AuctionUser this left outer join AuctionItem auctions1_ on this.id=auctions1_.seller where this.id=?

[java] 01:08:47,405 WARN JDBCExceptionReporter:38 - SQL Error: 1, SQLState: null

[java] 01:08:47,405 ERROR JDBCExceptionReporter:46 - Lexical error at line 1, column 59. Encountered: "\"" (34), after : "."


Top
 Profile  
 
 Post subject: Quote identifiers not working with Mckoi Dialect
PostPosted: Tue Dec 16, 2003 12:03 pm 
Newbie

Joined: Tue Dec 16, 2003 2:55 am
Posts: 3
I found this:

"You may force Hibernate to quote an identifier in the generated SQL by enclosing the table or column name in backticks in the mapping document. Hibernate will use the correct quotation style for the SQL Dialect (usually double quotes, but brackets for SQL Server and backticks for MySQL). "

I realize I can change the field names in the eg example to make it run, but it appears that the McKoi Dialect does not handle this situation properly. Does anyone know what McKoi needs as it's quotation style? I will try to find out in the meantime ...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 16, 2003 10:08 pm 
Newbie

Joined: Tue Dec 16, 2003 2:55 am
Posts: 3
Better yet - I'll just use a different database.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.