Salesforce Lightning Controller compound filed issue.

Salesforce Lightning Controller compound filed issue.

Salesforce Lightning Apex Controller will not support compound fields.  When you use compound fields with @AuraEnable annotation you will be receiving an “Error message: Error: An internal server error has occurred”

Here is the code.

 

Developer Console error message.

Solution : 

You have to use individual fields instead of compound fields.