google-code-export / morphia

Automatically exported from code.google.com/p/morphia
1 stars 0 forks source link

Hope add `subType, mapKeyType` to annotaions `Embeded, Property, Reference` #274

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I hope we can specify these types, because when I use morphia in scala, I found 
scala will drop generic type information of collection fields defined in traits.

That means we can't use traits to reuse some code if there is a collection 
field need to be declared in trait.

Please see this question: 

http://stackoverflow.com/questions/5919903/the-generic-type-information-of-field
s-in-traits-are-missing/5920071#5920071

I have fixed it in my own project by adding `subType, mapKeyType` to 
annotations `Embeded, Property, Reference`. When mapping, I will first check 
these annotations to get these types.It works well now.

Original issue reported on code.google.com by nowind...@gmail.com on 7 May 2011 at 11:34