You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (constructor.getParameterCount() == model.getProperties().size() && namesMatchProperties(model, constructor)) {
Where constructor.getParameterCount() == model.getProperties().size() won't equal since model.getProperties() can contain properties from super class(es)
Oof. My apologies. I got caught up in some personal life bits and then hyperfocused on critter and 2.3.0. I'm leaving for a conference soon (where i'll be doing a morphia talk!) but I'll try to push this release out.
Describe the bug
If the class extends a base class morphia fails to instantiate the class. This is due to:
morphia/core/src/main/java/dev/morphia/mapping/experimental/ConstructorCreator.java
Line 68 in 4ba6108
Where
constructor.getParameterCount() == model.getProperties().size()
won't equal sincemodel.getProperties()
can contain properties from super class(es)To Reproduce
Steps to reproduce the behavior:
No suitable constructor found for type: ...
Expected behavior
The class to be instantiated
Suggestion: As a last resort, use: https://github.com/google/gson/blob/master/gson/src/main/java/com/google/gson/internal/UnsafeAllocator.java to instantiate the class
** Please complete the following information: **
The text was updated successfully, but these errors were encountered: