Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Jpa UNION and MySql(Parenthesis around SQL expression triggers error)
Jpa UNION and MySql [message #1095841] Tue, 27 August 2013 15:50 Go to next message
Rainer Schön is currently offline Rainer SchönFriend
Messages: 2
Registered: November 2012
Junior Member
If the UNION element in a jpa SELECT statement is present, EclipseLink wraps the whole expression in parenthesis:

(SELECT Count(x) FROM Entity x UNION SELECT Count(y) FROM Entity y).

MySql (my version is 5.5) triggers ERROR 1064, when those parenthesis are set. There exists a MySql bug report (#25734) since 2007 for this issue, but obviously they never fixed it.

Has anyone an idea, how to prevent EclipseLink from putting those parenthesis?

Every hint is appreciated.

Thanks.
Rainer

Re: Jpa UNION and MySql [message #1095997 is a reply to message #1095841] Tue, 27 August 2013 20:44 Go to previous message
Rainer Schön is currently offline Rainer SchönFriend
Messages: 2
Registered: November 2012
Junior Member
Found an answer myself. Seems to be Bugzilla bug #378573 reported on 2012-05-05 but not fixed until now. If you came accross the same problem, please vote for it.

Tanks.
Rainer
Previous Topic:@JoinColumn @Convert
Next Topic:Criteria API joinList inheritance Problem
Goto Forum:
  


Current Time: Thu Dec 18 16:30:39 GMT 2014

Powered by FUDForum. Page generated in 0.01708 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software