-->
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: FrontBase problems running the example
PostPosted: Fri Oct 07, 2005 12:01 pm 
Newbie

Joined: Fri Oct 07, 2005 11:43 am
Posts: 2
Location: Minnesota, USA
Is anyone able to run the Hibernate example with FrontBase? I get some mean, nasty errors that look like bad SQL to me.

I've cleaned this up a little....

[java] 09:37:59,190 WARN JDBCExceptionReporter:71 - SQL Error: 226, SQLState: null
[java] 09:37:59,190 ERROR JDBCExceptionReporter:72 - Semantic error 226. Referenced column - ENDS - not found.
[java] 09:37:59,191 WARN JDBCExceptionReporter:71 - SQL Error: 485, SQLState: null
[java] 09:37:59,191 ERROR JDBCExceptionReporter:72 - Semantic error 485. Near:

SELECT AUCTIONITE0_.ID AS ID0_,
BIDS1_.ID AS ID1_,
USER2_.ID AS ID2_,
AUCTIONITE0_.SELLER AS SELLER0_0_,
AUCTIONITE0_.DESCRIPTION AS DESCRIPT3_0_0_,
AUCTIONITE0_.ENDS AS ENDS0_0_,
AUCTIONITE0_.CONDITION AS CONDITION0_0_,
AUCTIONITE0_.SUCCESSFULBID AS SUCCESSF6_0_0_,
BIDS1_.ITEM AS ITEM1_1_,
BIDS1_.AMOUNT AS AMOUNT1_1_,
BIDS1_.DATETIME AS DATETIME5_1_1_,
BIDS1_.BIDDER AS BIDDER1_1_,
BIDS1_.ISBUYNOW AS ISBUYNOW1_,
BIDS1_.ITEM AS ITEM0__,
BIDS1_.ID AS ID0__,
USER2_.USERNAME AS USERNAME2_2_,
USER2_.PASSWORD AS PASSWORD3_2_2_,
USER2_.EMAIL AS EMAIL2_2_,
USER2_.FIRSTNAME AS FIRSTNAME2_2_,
USER2_.INITIAL AS INITIAL6_2_2_,
USER2_.LASTNAME AS LASTNAME2_2_
FROM (AUCTIONITEM AS AUCTIONITE0_ LEFT JOIN BID AS BIDS1_ ON AUCTIONITE0_.ID=BIDS1_.ITEM) LEFT JOIN AUCTIONUSER AS USER2_ ON BIDS1_.BIDDER=USER2_.ID
ORDER BY AUCTIONITE0_.ENDS DESC;

The problem is the ORDER BY clause. Because of the AS portions in the select list, the ORDER BY clause really needs to be ORDER BY ENDS0_0_ DESC.

This happens during "ant eg" after installing. The database is successfully created and populated without errors, and I can get the SELECT statement to work from FrontBaseManager if I adjust the ORDER BY clause.

I've looked at FrontBaseDialect to see if there was anything useful there, but he's really quite brief.

I'm a brand new Hibernate user -- I'm just going through the process of getting it running on my machine.

Hibernate version is 3.0.5 (current production release).
FrontBase is 3.6.44, I believe -- dated December 2004 (10 months old).

Comments anyone?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 07, 2005 12:26 pm 
Newbie

Joined: Fri Oct 07, 2005 11:43 am
Posts: 2
Location: Minnesota, USA
I modified the example and commented out the "order by" clause when defining the HGL. That select worked, but then it has problems with the next one.

That one has a GROUP BY clause and has the same issue as the ORDER BY clause reported above. Specficially, the SQL looks like:

SELECT AUCTIONITE0_.ID AS COL_0_0_,
AUCTIONITE0_.DESCRIPTION AS COL_1_0_,
AUCTIONITE0_.ENDS AS COL_2_0_,
MAX(ALL BIDS1_.AMOUNT) AS COL_3_0_
FROM AUCTIONITEM AS AUCTIONITE0_ LEFT JOIN BID AS BIDS1_ ON AUCTIONITE0_.ID=BIDS1_.ITEM
GROUP BY AUCTIONITE0_.ID, AUCTIONITE0_.DESCRIPTION, AUCTIONITE0_.ENDS;

As you can see, again we have the "AS" portions in the select, but the GROUP BY uses the original column names instead of the AS names.


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