users@glassfish.java.net

Overriding a column name in an Embedded

From: Benjamin Renaud <benjamin.renaud_at_gmail.com>
Date: Mon, 6 Aug 2007 10:00:29 -0700

I am trying to override the name of a generated column in Glassfish using
the @AttributeOverrides syntax:

@Embeddable
@AttributeOverrides({
@AttributeOverride(name="emailAddress",
        column=_at_Column(name="email_address")),
@AttributeOverride(name="mobileNumber",
        column=_at_Column(name="mobile_number")),
@AttributeOverride(name="timeZoneId",
        column=_at_Column(name="time_zone_id")),
@AttributeOverride(name="listSortOrder",
        column=_at_Column(name="list_sort_order")),
@AttributeOverride(name="hasAppInstalled",
        column=_at_Column(name="has_app_installed")),
@AttributeOverride(name="compactView",
        column=_at_Column(name="compact_view"))
})
public class UserPreferences {

    private String emailAddress;
    private String mobileNumber;
    private String timeZoneId;
    private ListSortOrder listSortOrder;
    private boolean hasAppInstalled = false;
    private boolean compactView = true;

etc.

It does not seem to work. The column generated are "emailaddress"
"compactview" and so on.

Am I doing something wrong or if this is a known issue?

Thanks!
Benjamin