if(a.getPersistentAttributeType().equals(PersistentAttributeType.MANY_TO_ONE)){
Class c = a.getJavaType();
String entityType = c.getName();
String columnName = a.getName();
String entityName = a.getName(); //getEntityNameFromEntityType(entityType);
IModelEntity subentity = new ModelEntity(entityName, null, columnName, entityType, dataMartEntity.getStructure());
subEntities.add(subentity);
}else//composite key
if(a.getPersistentAttributeType().equals(PersistentAttributeType.EMBEDDED)){
Set<Attribute> keyAttre = ((EmbeddableType)((SingularAttribute)a).getType()).getAttributes();
Iterator<Attribute> keyIter = keyAttre.iterator();