<% var keyPrefix = angularAppName + '.'+ entityInstance; %>

<%= entityClass %> {{<%= entityInstance %>.id}}

<% for (fieldId in fields) { %> <% } %><% for (relationshipId in relationships) { var relationshipType = relationships[relationshipId].relationshipType; var ownerSide = relationships[relationshipId].ownerSide; var relationshipName = relationships[relationshipId].relationshipName; var relationshipFieldName = relationships[relationshipId].relationshipFieldName; var otherEntityName = relationships[relationshipId].otherEntityName; var otherEntityField = relationships[relationshipId].otherEntityField; var otherEntityFieldCapitalized = relationships[relationshipId].otherEntityFieldCapitalized; if (relationshipType == 'many-to-one' || (relationshipType == 'one-to-one' && ownerSide == true) || (relationshipType == 'many-to-many' && ownerSide == true)) { %> <% } } %>
Field Value
<%=fields[fieldId].fieldNameCapitalized%> <% if (fields[fieldId].fieldIsEnum) { var enumPrefix = angularAppName + '.'+ fields[fieldId].fieldType; %> <% } else if (fields[fieldId].fieldType == 'byte[]' && fields[fieldId].fieldTypeBlobContent == 'image') { %> <% } else { %> {{<%= entityInstance %>.<%=fields[fieldId].fieldName%>}}<% } %>
<%=relationshipName%> <% if (otherEntityName == 'user') { -%> <% if (relationshipType == 'many-to-many') { -%> {{<%= relationshipFieldName %>.<%= otherEntityField %>}}{{$last ? '' : ', '}} <% } else { -%> <% if (dto == 'no') { -%> {{<%= entityInstance + "." + relationshipFieldName + "." + otherEntityField %>}} <% } else { -%> {{<%= entityInstance + "." + relationshipFieldName + otherEntityFieldCapitalized %>}} <% } -%> <% } -%> <% } else { -%> <% if (relationshipType == 'many-to-many') { -%> {{<%= relationshipFieldName %>.<%= otherEntityField %>}}{{$last ? '' : ', '}} <% } else { -%> <% if (dto == 'no') { -%> })">{{<%= entityInstance + "." + relationshipFieldName + "." + otherEntityField %>}} <% } else { -%> })">{{<%= entityInstance + "." + relationshipFieldName + otherEntityFieldCapitalized %>}} <% } -%> <% } -%> <% } -%>