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

Add support for entity splitting (multiple entity types, same table row) #20

Open
FransBouma opened this issue Jan 16, 2015 · 0 comments

Comments

@FransBouma
Copy link
Owner

Entity splitting is sometimes a nice feature if you want to model a part of an entity into another entity. Typical example is to model the Photo field (which is an Image field) in an Employee entity into a separate entity, e.g. EmployeePhoto, with a 1:1 relationship over the PK. This allows the Employee entity to not fetch the Photo field by default, only when the related entity is fetched as well.

The implementation is a little tricky because persisting a new EmployeePhoto entity isn't an insert but an update of an existing row. I.o.w.: the entity type has to be known as a 'split off' entity so the core logic knows to generate an update, not an insert.

(related to #21)

@FransBouma FransBouma changed the title Add support for entity splitting (multiple entities, same table row) Add support for entity splitting (multiple entity types, same table row) Jan 16, 2015
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

1 participant