ObjectDB ObjectDB

Issue #646: Different behavior for casting and not casting

Type: Bug ReoprtPriority: NormalStatus: FixedReplies: 1
#1

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
edit
delete
#2

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
edit
delete

Reply

To post on this website please sign in.