google-code-export / morphia

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

Support parameterized classes in fields #175

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Support fields like this:

@Entity
class MyEntity {
   @Id ObjectId id;
   MyClass<String> s;
}

Currently you must create a concrete class like this:

class MyClassString extends MyClass<String> {...

Original issue reported on code.google.com by scotthernandez on 1 Dec 2010 at 6:30

GoogleCodeExporter commented 9 years ago
Why is this restriction currently in place ?

Original comment by joseph.p...@gmail.com on 29 Dec 2010 at 12:25

GoogleCodeExporter commented 9 years ago
This isn't something which we said "let's make this a restriction so people 
can't do it"; There needs to be more code written to support this kind of usage.

Original comment by scotthernandez on 29 Dec 2010 at 3:35

GoogleCodeExporter commented 9 years ago
ok, my bad. I thought this since I'm under the impression that it used to work 
but doesn't anymore.

I look again at it, is it correct that it's due to MappedField.discover working 
on the class instead of the instance ?

Original comment by joseph.p...@gmail.com on 30 Dec 2010 at 2:01