users@jaxb.java.net

Field name requirements - issue with single letter camel case.

From: jaybytez <jaybytez_at_yahoo.com>
Date: Wed, 16 Mar 2011 11:18:57 -0700 (PDT)

I have the same exact issue with a field via Hibernate/JPA, where it doesn't
like that I have a field named: eAddress:

https://forum.hibernate.org/viewtopic.php?f=1&t=1010057

Here is a code sample....The following code will not marshal/unmarshall my
ElectronicAddress field. But if I change the field name in the propOrder
only to EAddress...then it works. Not sure if it is a naming issue for that
field or the fact that it's name is similar to another field:

/**
 * This is a generated class. Do not modify.
 */
@XmlRootElement(namespace = "http://foo.com/model/cas", name =
"PersonContact")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(namespace = "http://foo.com/model/cas", name = "PersonContact",
propOrder = { "eAddress", "eAddressCpId" })
public class PersonContact extends EffectiveEntity<PersonContact.Id> {

    /**
     * The serialize value.
     */
    private static final long serialVersionUID = -1L;
    /**
     * The PersonContact.Id field.
     */
    @XmlElement(name = "ElectronicAddress", namespace = "##default")
    private ElectronicAddress eAddress;
    
    /**
     * The eAddressCpId field.
     */
    @XmlElement(name = "EAddressCpId", namespace = "##default")
    private Long eAddressCpId;
.....

Thanks,

Jay
-- 
View this message in context: http://old.nabble.com/Field-name-requirements---issue-with-single-letter-camel-case.-tp31166198p31166198.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.