Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.7.6
-
None
-
None
Description
A large number of Java designs interacting with databases with Hibernate/Couchbase (perhaps, even otherwise) have Java polymorphism of the form:
class Base { Integer a = 5; } class Derived extends Base { String b = "Foo"; } class PolymorphicDO { Base b = new Derived(); }
Jackson handles this kind of field by using annotations such as:
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class”)
If such a thing can be added to Avro, all those Java designs could become immediately usable with Avro. They would also become Hadoop compatible due to AvroSerde.