Issues

Select view

Select search mode

 
49 of 49

Unable to load entities with composite id using HSQLDB

Rejected

Description

Hi,

Hibernate Search actually manages to find entries in the lucene index, but then it fails trying to load them.
In fact, this issue seems to boil down to HSQLDB not supporting a query of this kind "...where (a,b) in (('x','y'))".
Caused by: java.sql.SQLException: Unexpected token: , in statement

This issue doesn't appear with Oracle, which is our production database. But it prevents us from unit/integration testing our code (using Arquillian/hsqldb/dbunit), which is in fact not very cool.

After that discussion on the forum, I've taken some time to create a test project (I'll host in a dedicated github repository, actually).

As explained on the forum, I guess I'm stuck using 3.1.1.GA, since we're using JBoss EAP 5.x.

Do you think that could be fixed?
If you give me pointers so that I can see if I can propose a patch, would it even be possible to release a 3.x version of hsearch?

Thanks for your answers.

Details

Assignee

Reporter

Affects versions

Priority

Created December 21, 2011 at 12:40 PM
Updated January 11, 2012 at 5:13 PM
Resolved January 11, 2012 at 5:12 PM

Activity

Show:

Hardy FerentschikJanuary 11, 2012 at 5:13 PM

Thanks

Sanne GrinoveroJanuary 11, 2012 at 5:12 PM

Thanks Baptiste, closing the issue.

Baptiste MathusJanuary 11, 2012 at 4:54 PM

Hi Hardy,

I tried upgrading to 2.2.6, and it actually both went smoothly and fixed the issue.
So please consider this bug not an issue anymore. I don't think it's worth backporting any fix.

Thanks for your help.

Hardy FerentschikDecember 21, 2011 at 2:00 PM

it seems to me you are using a very old version of HSQLDB. This for example seems to work just fine:

If not, have you tried switching to H2?

Baptiste MathusDecember 21, 2011 at 1:21 PM

Ok, repo created: https://github.com/Batmat/HSEARCH-1011-testcase

The branch showing that very issue with Hsearch 3.1.1.GA: https://github.com/Batmat/HSEARCH-1011-testcase/tree/hsearch-3.1.1.GA-cannot-load-composite-id-with-HSQLDB

The (almost) same code, using hsearch 4.0.0.Final, showing it's working with this version: (base branch) hsearch-4.0.0.Final-ok-with-composite-id-with-HSQLDB

Cheers

Flag notifications