jaxb-api icon indicating copy to clipboard operation
jaxb-api copied to clipboard

Why @XmlID must be a String ?

Open Tomas-Kraus opened this issue 16 years ago • 5 comments

Hi,

I need to serialize some EJB3 entities which have and numeric java.lang.Long id. The identifier of an entity is annotated with @Id for JPA ant with @XmlId but on runtime, the following exception occur :

Property "id" has an XmlID annotation but its type is not String.

Why this limitation ? Why not call the "toString()" method of the id field ?

Thank you. Stéphane

Environment

Operating System: All Platform: All

Affected Versions

[2.1.7]

Tomas-Kraus avatar Aug 21 '08 01:08 Tomas-Kraus

  • Issue Imported From: https://github.com/javaee/jaxb-v2/issues/543
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: @glassfishrobot

Tomas-Kraus avatar Sep 21 '18 15:09 Tomas-Kraus

@glassfishrobot Commented Reported by [email protected]

Tomas-Kraus avatar Aug 21 '08 01:08 Tomas-Kraus

@glassfishrobot Commented Issue-Links: is duplicated by JAXB-806

Tomas-Kraus avatar Aug 21 '08 01:08 Tomas-Kraus

@glassfishrobot Commented Was assigned to snajper

Tomas-Kraus avatar Aug 21 '08 01:08 Tomas-Kraus

@glassfishrobot Commented This issue was imported from java.net JIRA JAXB-543

Tomas-Kraus avatar Apr 24 '17 12:04 Tomas-Kraus