Skip to content

Optimization: "relatedViaParentFault" strategy when only related "id" is requested #625

Description

@andrus

An optimization of Cayenne RelatedDataResolver:

If the child entity only includes "id" that can be expressed via the parent FK, use a new strategy - "relatedViaParentFault" that would avoid an extra query for a relationship

TODO:

Since this eliminates the relationship prefetch, this change would not resolve or refresh target objects. So if the custom access checking (or other custom) code is in use, this strategy is not a good one, as it will result either in a large number of per-object queries or in stale data.

cc: #442, #539, #623

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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