Can't get entending customer form order.getCustomer
Posted: Mon Dec 01, 2014 4:31 am
hi,
I have extended a customer with new field named "message", the entity class named "OwnerCustomerImpl", then I can see the value of message is stored into DB when I created a new customer. After this customer created a order, then I want to get the customer from order like "order.getCustomer()", and I want to get the "message" value, so I just costed this customer like
"OwnerCustomerImpl customer= (OwnerCustomerImpl)order.getCustomer()" ,
but I got cost error.
I debugged the code, and I can see the type of "order.getCustomer()" is "CustomerImpl", not as expected "OwnerCustomerImpl".
So should I do some extra work for this problem? I read the DOC about this, but it seems I need not do any other things, so can anybody help to take a look this problem?
thanks
Johnson
I have extended a customer with new field named "message", the entity class named "OwnerCustomerImpl", then I can see the value of message is stored into DB when I created a new customer. After this customer created a order, then I want to get the customer from order like "order.getCustomer()", and I want to get the "message" value, so I just costed this customer like
"OwnerCustomerImpl customer= (OwnerCustomerImpl)order.getCustomer()" ,
but I got cost error.
I debugged the code, and I can see the type of "order.getCustomer()" is "CustomerImpl", not as expected "OwnerCustomerImpl".
So should I do some extra work for this problem? I read the DOC about this, but it seems I need not do any other things, so can anybody help to take a look this problem?
thanks
Johnson