-
Notifications
You must be signed in to change notification settings - Fork 157
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
Check attributes for consistency amongst key definitions #38
Comments
https://github.com/realm/realm-wiki/wiki/Bindings says we should specify single or, possibly, multiple properties to act as a primary key so it seems multiple field specification is explicitly required - the problem then is one of ordering of fields to provide the composite key. |
multiple keys are not yet supported. But it doesn't harm to consider if the On Sun, Aug 16, 2015 at 11:53 AM, Andy Dent notifications@github.com
|
Note that PrimaryKey was renamed ObjectId (we're at least floating with that in the dotnet betas and will see how users react, other products haven't changed). |
Because we're specifying the primary key using the attribute
[PrimaryKey][ObjectId]
we need a check to make sure this is not specified on more than one field in a given class.This has to be a runtime check.Update 2016-02-19 with more Fody knowledge, now realise we can easily do this in FodyAlternatively, we could redesign the feature to specify the primary key with key name as parameter and make it a class-level attribute. That would take care of the problem of specifying more than one but then add a different check to ensure the field name was valid and that the field wasn't tagged with the [Ignore]
The text was updated successfully, but these errors were encountered: