/** * INTERNAL: * * Process a Serialized or Basic into a DirectToFieldMapping. If neither * is found a DirectToFieldMapping is created regardless. */ protected void processDirectToFieldMapping(DatabaseField field) { DirectToFieldMapping mapping = new DirectToFieldMapping(); mapping.setField(field); mapping.setIsReadOnly(field.isReadOnly()); mapping.setAttributeName(getAttributeName()); mapping.setIsOptional(isOptional()); if (usesIndirection()) { m_logger.logWarningMessage(m_logger.IGNORE_BASIC_FETCH_LAZY, this); } // Will check for PROPERTY access setAccessorMethods(mapping); // Process a converter for this mapping. We will look for a @Convert // first. If none is found then we'll look for a JPA converter, that // is, @Enumerated, @Lob and @Temporal. With everything falling into // a serialized mapping if no converter whatsoever is found. processMappingConverter(mapping); // Add the mapping to the descriptor. m_descriptor.addMapping(mapping); }
if (fkField.isReadOnly()) { mapping.setIsReadOnly(true);