Skip to content

ability to link queries with OR not just AND #1223

@chirastefan

Description

@chirastefan

Use case

I have a DB where EntryA has one-to-many relationships with EntryB.
I encountered a case where I have a text field, and I want to query the EntryA database to retrieve all entries filtered by that text field's value.
So for value 'aa', I want to get all the EntryA values where EntryA.name contains 'aa' OR(not AND, which is the default) if EntityA.items contain items with name containing 'aa'

Code example

        final builder =
            store.box<EntryA>().query(EntryA_.name.contains('aa'))
              ..link(EntryA_.owner, Owner_.id.equals(123))
              ..backlink(EntryB_.parent, EntryB_.name.contains('bb'));

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions