// Populate id attribute.
SingularAttribute idAttribute = m.getIdAttribute();
if (metaModel.isEmbeddable(idAttribute.getBindableJavaType()))
{
Field field = (Field) idAttribute.getJavaMember();
EmbeddableType embeddableType = metaModel.embeddable(idAttribute.getBindableJavaType());
String _id = get_Id(field, PropertyAccessorHelper.getObject(entity, field), embeddableType,
m.getTableName());
jsonObject.addProperty("_id", _id);
Object embeddedObject = PropertyAccessorHelper.getObject(entity, (Field) idAttribute.getJavaMember());
Set<Attribute> embeddableAttributes = embeddableType.getAttributes();
jsonObject.add(((AbstractAttribute) idAttribute).getJPAColumnName(),
getJsonObject(field.getType().getDeclaredFields(), embeddableType, embeddedObject));
}
else