Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fix load by alternate key with Automatic primary key #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jesterpm
Copy link
Contributor

@jesterpm jesterpm commented Mar 26, 2018

Storables ignore @Automatic properties when checking if the primary key
is initialized. This makes sense for insert, because the Repository is
responsible for populating the @Automatic property. However, this doesn't
work for load--when the @Automatic property is also the primary key--
because it won't attempt to load by alternate key when it must.

These are the tests for Carbonado/Carbonado#7

Storables ignore @Automatic properties when checking if the primary key
is initialized. This makes sense for insert, because the Repository is
responsible for populating the @Automatic property. However, this doesn't
work for load--when the @Automatic property is also the primary key--
because it won't attempt to load by alternate key when it must.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants