Skip to content

Conversation

@dncsvr
Copy link
Member

@dncsvr dncsvr commented Jan 20, 2026

Provide a solution for improving locating transients and entities

Notes

  • Add object to id, id to object conversion templates to locatable attribute
  • Merge them to have only the concept of Rich Transient. Rich Entity should
    inherit all there is from Rich Transient, and add lookup and nhibernate init
    logic.
    • Remove duplicate conventions to support both
  • Decouple locatable coding style from rich entity pattern. Entities should
    become locatable, and all query apis, not because they are entities, because
    they are rich transients.
  • query object should become an independent coding style
    • queryattribute (if not already) might be introduced

Tasks

  • Add a coding style feature to merge common configurations for transients
    • TransientBinding 🤔
    • Use Locatable attribute when exists otherwise use Initializer for target and
      parameter lookup
    • Add id parameter to route if Locatable otherwise add initializer params
      to query
  • Add required data to locatable attribute for finding target and lookup
  • Add ILocator<> interface
  • Refactor RichTransient feature to configure Locatable attribute and
  • Add generic EntityLocator<> implementation for RichEntity
  • Refactor RichEntity feature to configure Locatable attribute
    • Generate and register Locator implementations for RichTransient
  • Refactor EntitySubclassViaComposition to configure Locatable attribute
  • Update documentation
  • Update unreleased
  • ...

Additional Tasks

  • provide generated Guid, assigned string and auto-increment uint
    options
  • property names is not obliged to be Id, convention will look for a
    property with a type that is assignable to an id interface such as IId
    • foreign key suffix is now the name of the PK property, not hardcoded using
      Id
  • improve id type tests

@dncsvr dncsvr self-assigned this Jan 20, 2026
- rename id tests to `ConfiguringEntityIds `
@cihandeniz cihandeniz mentioned this pull request Jan 21, 2026
6 tasks
that property to entity id route parameter so that entites can be found through
unique properties as well as their ids. For instance, if entity has
`SingleByName` then its id route parameter is updated from `{id}` to
`{idOrName}`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: remove this coding style from docs, it was removed from code. remove also from recipes

{
features.Add(new Playground.Override.DataAccess.MappingsDataAccessOverrideFeature());
features.Add(new Playground.Override.Domain.CustomAttributeDomainOverrideFeature());
features.Add(new Playground.Override.Id.MapingIdsOverrideFeature());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overrides are related to Layers, not features or coding styles. so this should bi under DataAccess. i think MappingDataAccessOverrideFeature exists exactly for overrides like this.

dncsvr added 13 commits January 23, 2026 14:39
- reanem feature to `TransientBinding`
- refactor rich transient and entity to configure Locatable attribute
- temporarily remove entity subclass samples
- implement service adde template for adding locators
- add additional conventions for entity sub class to fix route and parameter
- fix locator adder template
- minor edits and refactoring
- remove commented code
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