-
Notifications
You must be signed in to change notification settings - Fork 376
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
Can't validate association properties #187
Comments
Extra properties are really tricky but they only happen in |
The issue isn't extra properties, it's Having to remember to check every type of property all the time will keep introducting corner case-bugs much like this one. I think we should have one list composed of all properties that belong to the model, much like we have one
|
Because of the change introduced by this issue it's no longer possible to validate association generated fields. There is a failing test case here.
I can see a few possible resolutions but am unsure which is best:
hasOne
association so that it adds first class properties to the model, rather thanassociation_properties
. Perhaps there's a good reason why they're separate.all_properties
which would be the sum ofproperties
andassociation_properties
. I think this would warrant adding a method toModel
such asadd_property(...)
else it might be hard to track everything.handleValidations
althoughassociation_properties
doesn't store full properties likeproperties
does. Seems to be just a list.sync
so that it's possible to explicitly define the association column in thedb.define
call (currently, if there is overlap, the sync function will define the column twice, causing an SQL error).What do you think?
The text was updated successfully, but these errors were encountered: