-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Cannot Define Mapper To Include a Key That Does Not Exist With DefaultIncludes #40
Comments
This is the code that processes the includes
As you can see it does check the mappers. However, do you happen to have trusted getters to TRUE?? |
You're right @lmajano , and I think I see the problem. Quick, by default, has One suggestion that might be cool, so it doesn't mess with Quick would be to allow for Mementifier profiles to be able to override
Current way to override Quick's
|
|
Can confirm: Possible workaround if you need to use a memento profile, and you don't need Quick's
|
Defining a mapper to include a key that doesn't exist within the model will throw an exception if the mapper exists inside of the model, and not outside.
Steps to reproduce this issue?
Update the test-harness
User
model and add the "foo" mapper inside the model and also add optionally it to the list ofdefaultIncludes
.Now, when you call
getMemento()
on the object, you will get a missing method error thatgetFoo
can't be found.Based on what I have discovered by playing around with the test harness, you can define a mapper to a key that doesn't exist if you define the mapper outside the model and specify the name in the list of
includes
. However, it breaks if the mapper exists inside the model and you usedefaultIncludes
inside the model orincludes
outside.The only workaround is to explicitly add the property (or virtual attribute if you're using Quick) to your model or define your mappers outside of the model.
The text was updated successfully, but these errors were encountered: