App Class enhance order

106 views
Skip to first unread message

green

unread,
Jun 20, 2011, 8:55:58 PM6/20/11
to play-framework
Hi

I found a strange problem with Morphia caused by the order of app class enhancement. Here is the story:

1. morphia enhance model classes by adding ID field automatically if it's not found in this class or it's parent class
2. a sub type class get enhanced before parent class and duplicate ID field found in the end. 

So the question is: is there any mean to make sure the parent class get enhanced always before it's sub classes?

Regards,
Green

Morten Kjetland

unread,
Jun 21, 2011, 2:28:35 AM6/21/11
to play-fr...@googlegroups.com
No, I don't think so.

because the classes are enhanced as they are loaded.

So if class A used class B, and C uses D extends B, and A is loaded first, then B will be loaded, then when C is loaded, D would be loaded.

-morten

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.



--
~~~~~~~~~~~~~~~
Morten Kjetland
~~~~~~~~~~~~~~~
https://twitter.com/mbknor
Reply all
Reply to author
Forward
0 new messages