juliocamarero/liferay-portal — pull request #767 by KocsisDaniel (2012-11-20 11:49:29+00:00)
Title: LPS-30889

Hi Julio,

I reviewed the code and found the rootcause of the issue. The problem was we declared the StagedModel to extend GroupedModel which extends AuditedModel. The AuditedModel requires createDate and modifiedDate attributes but it doesn't check the type only the field name meanwhile the interface assume Date as type. In the service.xml of the social portlet we declared the SocialRequest entity fields with long type so when we appended the interface to the extends list it caused build error. (it was declared to long because msyql can't store millisec values to dates and we need millisecs here)

I also simplified the isStagedModel method to follow the pattern to check the extended model and only the new required attributes.

I am not sure if it is OK to have the last commit regarding type safety in this pull request so please let me know if I should open a new ticket and send this fix separately.

cc-ing: @matethurzo

thanks,
Daniel