Skip to content

Conversation

@Revsgaard
Copy link
Contributor

It seams that the (notIdIsEmpty || q.Id != notId) && (q.Id == idOrAdditionalId || q.AdditionalIds.Contains(idOrAdditionalId)) problem has to do with the inheritance and interface inheritance in FoxIDs.

I have added a complex expression test with inheritance that works and with interface inheritance that fails. The interface inheritance that fails is the problem in FoxIds. Do you think it is possible to resolve the interface inheritance problem?

@Revsgaard
Copy link
Contributor Author

@bjornharrtell what do you think?

@bjornharrtell
Copy link
Owner

I find that the passing test builds query:

{((@p1::boolean or ((value ->> 'id')::text != @p2)) and (((value ->> 'id')::text = @p3) or jsonb_exists(value, @p4)}

While the failing test builds this query:

{((@p1::boolean or ((value ->> 'id')::text != @p2)) and (((value ->> 'id')::text = @p3) or jsonb_exists((value -> 'additionalIds'), @p4)}

@bjornharrtell
Copy link
Owner

Found the reason, tracked by https://github.com/bjornharrtell/PgKeyValueDB/issues and fixed in #20 that includes the tests. Thanks @Revsgaard, I'll issue a patch release ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants