[
https://issues.apache.org/jira/browse/AVRO-2115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16295361#comment-16295361
]
ASF subversion and git services commented on AVRO-2115:
-------------------------------------------------------
Commit 5040c6413b112665cd051c415f368f9a51426b97 in avro's branch
refs/heads/master from [~cutting]
[ https://git-wip-us.apache.org/repos/asf?p=avro.git;h=5040c64 ]
AVRO-2115: Java: Permit @Union annotations on fields of classes.
Contributed by Miguel Martinez-Espronceda.
> Support @Union in members too
> -----------------------------
>
> Key: AVRO-2115
> URL: https://issues.apache.org/jira/browse/AVRO-2115
> Project: Avro
> Issue Type: Improvement
> Reporter: Miguel
> Priority: Minor
>
> Allow defining unions in members:
> {code:java}
> class MyDatum {
> @Nullable
> @Union({String.class, Long.class, Other.class,...})
> Object o;
> }
> {code}
> It can currently be implemented using @AvroSchema like this, but it is seems
> in my oppinion more verbose and more difficult to maintain:
> {code:java}
> @AvroSchema("[\"null\",\"string\",...")
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)