/**
* INTERNAL:
* Initialize a ManyToOneMapping.
*/
protected ManyToOneMapping initManyToOneMapping() {
ManyToOneMapping mapping = new ManyToOneMapping();
mapping.setIsReadOnly(false);
mapping.setIsOptional(isOptional());
mapping.setAttributeName(getAttributeName());
mapping.setReferenceClassName(getReferenceClassName());
mapping.setDerivesId(derivesId());
// Process join fetch type.
processJoinFetch(getJoinFetch(), mapping);
// Process the batch fetch if specified.