128 words

Issue #133 - Different behavior for casting and not casting

BugVersion: Priority: NormalStatus: FixedReplies: 1
#1
2012-01-19 07:10

Hi,

Please use attached db for testing the queries.

Query #1 which works and selects a few entities:

SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 WHERE $1.qubletFRAGMENTMAP.get('com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedVertraegeFragment') IS NOT NULL

Query #2 which is equal to the previous one though includes a casting and returns NO entities:

SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 WHERE ((com.quasado.foundation.warehouse.api.model.inventory.contact.AbstractContactContractsFragment)$1.qubletFRAGMENTMAP.get('com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedVertraegeFragment')) IS NOT NULL

Furthermore, checking for empty collection doesn't return any entity either, however I am not sure whether this might start working when the previous issue with casting is resolved:

SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 WHERE ((com.quasado.foundation.warehouse.api.model.inventory.contact.AbstractContactContractsFragment)$1.qubletFRAGMENTMAP.get('com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedVertraegeFragment')).contracts IS NOT EMPTY
quasado
quasado's picture
Joined on 2011-04-30
User Post #98
#2
2012-01-19 08:14

Apparently inheritance in casting was broken. Since casting in not part of JPQL and rarely used I am afraid it might not be the last problem that you find. Please continue with build 2.3.6_13.

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

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