131 words

JPA-Query does not lead to any result

#1
2013-08-23 11:06

Hi,

we have a database with a Entitiy inside which we want to fetch with a query. Normally that works without a problem, but in case of this database that query does not have any results. Can anyome help us what the problem is?

SELECT FROM UserModelData usr WHERE usr.userName = 'admin'

Attached are two databases, one where the query has a result and one where the query does not has any results.

skolb
skolb's picture
Joined on 2012-05-04
User Post #12
#2
2013-08-23 16:35

The query is executed using an index on field userName.

In not-working.odb, the index looks:

0 -> UserModelData:"admin"
"system" -> UserModelData:"system"

It is unclear why the first index entry contains a number (0) rather than a string ("admin").

If you have more information about this specific file it may help.

You should be able to fix indexes by running the ObjectDB Doctor.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,641

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel