@Override public void complete() { AmberPersistenceUnit persistenceUnit = _sourceType.getPersistenceUnit(); Class targetClass = getTargetClass(); if (targetClass == null || void.class.equals(targetClass)) throw error( _field, L.l( "Can't determine targetEntity for {0}. @OneToMany properties must target @Entity beans.", _fieldName)); AmberType targetType = persistenceUnit.createType(targetClass); if (targetType == null) { throw error( _field, L.l( "targetClass '{0}' is not a known element collection class for {1}. The targetClass of a @ElementCollection must be a basic class.", targetClass.getName(), _fieldName)); } /* if (_orderBy != null) calculateOrderBy(_orderBy); */ addCollection(targetType); }