Skip to content

Provide a sensible way to detach entities completely [DATAGRAPH-114] #678

@spring-projects-issues

Description

@spring-projects-issues

Michael Hunger opened DATAGRAPH-114 and commented

  1. static declarations on @RelatedTo* annotations (like in JPA) -> don't like b/c of context ignorance
  2. dynamic programatic fetching within the session context (by navigating the required relationships)
  3. use-case specific fetch-groups, declarative (w/ annotations) + use-case/fetch-group name as context when loading (would be also possible with repository annotations)
  4. use-case specific fetch groups that are "auto-learned" by the infrastructure when the user navigates relationshiops manually and then are stored as meta information so that at the next fetch with that use-case pre-fetches the data
  5. declare/define fetch-groups as cypher-queries or traversals (which might also be the "metadata" for Unit test that shows broken NodeBacking.getRelationshipTo #4)
  6. have a use-case specific version of the domain objects that just contain the subgraph that the use-case is interested in and no outgoing relationships elsewhere (aka. DDD aggregate) then the infrastructure can fetch this whole subgraph and return it, with the projection abilities the entities can still be projected to other types (and the fetch-group-subgraph could probably used within the domain model to define mapping-contexts/boundaries (DDD again).

Paradox of choice as always. I'd prefer either something like 5 as the advanced version or #6 as type safe explicit one. But probably something simpler for the start would be more sensible.

See: http://forum.springsource.org/showthread.php?115116-SDG-How-to-remove-linkage-between-Domain-Object-and-NodeBacked


No further details from DATAGRAPH-114

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions