Page 1 of 1

The extended entiry bean not getting associated with the key

Posted: Fri May 18, 2012 7:55 am
by vinayakc
Hi,
I am working on POC BroadleafCommerce (version referred is 1.5.5) project, that is trying to have integrated Paypal Payment gateway.
Now the default provided CreditCardPaymentInfoImpl bean captures only a subset of information that I require while processing it via paypal. So I have extended that entity bean to capture few more attributes. For this I have used Hibernate inheritance mechinsms 'Table per sub class' paradigm.
I have followed steps mentioned in here http://wiki.broadleafcommerce.org/confluence/display/BLC15/Extending+Entities and http://wiki.broadleafcommerce.org/confluence/display/core/Spring+Bean+Extension+Quick+Reference with the corrected key for CreditCardInfo bean containg class MyCreditCardPaymentInfoImpl.

But when I ran the code, the Entity manager returns the old CreditCardPaymentInfoImpl class and not the overriden one, as a result the additional attributes that I require cannot be accessed.

Note: There is no exception while running the code either at compile time or run time.
I can see my entity being associated with the new table that I created for the additional attributes in the log.

Kindly suggest why this might be happening and what is required for the EntityManager to return MyCreditCardPaymentInfoImpl's instance.
Any help in this regard is appreciated.

Best regards,
Vinayak

Re: The extended entiry bean not getting associated with the key

Posted: Tue May 22, 2012 6:02 am
by vinayakc
Hi,
The above issue is resolved now. I moved the necessary changes from Site's context,persistence xml file to the respective files in core and voila, it worked! :ugeek:
Regards,
Vinayak Chalse