Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to load cross-datastore references in key-value queries #3954

Open
knstvk opened this issue Nov 29, 2024 · 0 comments
Open

Ability to load cross-datastore references in key-value queries #3954

knstvk opened this issue Nov 29, 2024 · 0 comments

Comments

@knstvk
Copy link
Contributor

knstvk commented Nov 29, 2024

Currently we cannot load x-ds references using DataManager.loadValues() because a JPQL query can contain only persistent attributes. However, we could achieve the goal if we let users provide an ID of the reference in JPQL and indicate that we actually need the x-ds reference in the properties list. For example:

<keyValueCollection id="keyValueCollection">
    <loader id="keyValueLoader">
        <query>
            <![CDATA[select d.id, d.name, d.db1JpaEntityId from Department d]]>
        </query>
    </loader>
    <properties>
        <property name="id" datatype="uuid"/>
        <property name="name" datatype="string"/>
        <property name="db1JpaEntity" class="com.company.onboarding.entity.Db1JpaEntity"/>
    </properties>
</keyValueCollection>

Here db1JpaEntityId is the persistent attribute that stores ID of the x-ds reference, and db1JpaEntity is the reference itself.

@knstvk knstvk added the triage Issue is waiting for triage label Nov 29, 2024
@glebfox glebfox added in: data size: M and removed triage Issue is waiting for triage labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants