Page 1 of 1

Customer DB Model doesn't match CustomerImpl

Posted: Wed Feb 01, 2012 3:55 pm
by ritchiem
Hi,

The Customer DB model contains a large number of fields that have not been mapped to the CustomerImpl class is there a reason for this?

CUSTOMER_ID
CREATED_BY
DATE_CREATED
DATE_UPDATED
UPDATED_BY
CHALLENGE_ANSWER
EMAIL_ADDRESS
FIRST_NAME
LAST_NAME
PASSWORD
PASSWORD_CHANGE_REQUIRED
RECEIVE_EMAIL
IS_REGISTERED
USER_NAME
CHALLENGE_QUESTION_ID
LOCALE_CODE

But in CustomerImpl I only see these columns

@Column(name = "CUSTOMER_ID")
@Column(name = "USER_NAME")
@Column(name = "PASSWORD")
@Column(name = "FIRST_NAME")
@Column(name = "LAST_NAME")
@Column(name = "EMAIL_ADDRESS")
@Column(name = "CHALLENGE_ANSWER")
@Column(name = "PASSWORD_CHANGE_REQUIRED")
@Column(name = "RECEIVE_EMAIL")
@Column(name = "IS_REGISTERED")

Is this intentional? Am I missing something or does that mean we can't access the rest of the table?

Cheers

Martin

Re: Customer DB Model doesn't match CustomerImpl

Posted: Thu Feb 02, 2012 2:19 pm
by jefffischer
There's an additional @Embedded item for Auditable in that entity that is responsible for the extra columns you're seeing. Accessing these requires that you call getAuditable().get... on customer to retrieve the values.