users@jaxb.java.net

How to get types right inside of IDRef'd Collections

From: Florian Thiel <flo.thiel+javanet_at_googlemail.com>
Date: Wed, 16 Jan 2008 16:34:27 -0500

Hi everybody,

I'm using custom IDResolver implementations to map object references
(e.g. Folder has an attribute which is of type Collection<Document>)
to Xml ID references (i.e. the Collection is annotated with XMLIDRef).
Sadly I only get "Object" as the targetType passed to resolve() in the
custom IDResolver. For single values annotated with XMLIDRef I get the
correct type, objects in a collection only give "Object". The JAXB 2.1
spec does not say anything about the expected behavior or necessary
annotations.

Does anyone know the right way to tell JAXB what the types in the
collections ought to be?

Thanks in advance,
Florian