}
public XMLDocumentElement createElement(XMLDocumentElement parent, XMLDocumentElementDefinition definition, Object instanceOverride) {
boolean translate = false;
ClassProperty type = definition.getProperty();
if (type != null) {
OneToOne oto = type.getAnnotation(OneToOne.class);
if (oto != null) {
if ("".equals( oto.mappedBy() )) translate = true; else return new XMLDocumentElementNoOp(parent, definition);
}
else if (type.getAnnotation(ManyToOne.class) != null) translate = true;
else if (type.getAnnotation(OneToMany.class) != null) return new XMLDocumentElementNoOp(parent, definition);
else if (type.getAnnotation(ManyToMany.class) != null) return new XMLDocumentElementNoOp(parent, definition);
if (type.getAnnotation(Transient.class) != null) return new XMLDocumentElementNoOp(parent, definition);
}
return translate ? new JPAEntityElementReference(parent, definition, instanceOverride) : null;
}