Skip to content
Advertisement

Invalid path in HQL and weird substitutions

I hope you can help me with this.

I am working on the upgrade of a customized installation of DSpace from 5.5 to 6.3 and I am running into a weird issue with HQL.

The SQL that I am trying to implement is this:

and this is the HQL that I wrote in my code and it is supposed to do the same:

and this is the error that it is raising:

First question: Why it is changing AuthorProfile2Bitstream to 8?

Second: If it is correctly finding the AuthorProfile2Bitstream class (as per the expanded query showed in the exception), then question #1 again.

Third: Is this the way to represent that join?

Thanks in advance,

These are my classes:

Bitstream

AuthorProfile2Bitstream

And these are their representations in DB:

Bitstream

AuthorProfile2Bitstream

Advertisement

Answer

OK, it is true that sometimes you just need to see your things posted somewhere or elaborate for another people to get the answer on your own.

My mistake was that in the WHERE clause I wasn’t referencing the AuthorProfile2Bistream instance ap2b but the class itself.

So, the correct (and now working) HQL query is this

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement