code: protected Property createProperty(Value value, PersistentClass persistentClass, PersistentProperty grailsProperty, InFlightMetadataCollector mappings) {
          // set type
          value.setTypeUsingReflection(persistentClass.getClassName(), grailsProperty.getName());
  
          if (value.getTable() != null) {
              value.createForeignKey();
          }
  
          Property prop = new Property();
          prop.setValue(value);
          bindProperty(grailsProperty, prop, mappings);
          return prop;
      }
docs: /*
  Creates a persistent class property based on the GrailDomainClassProperty instance.