protected function parseColumn($name, Annotation $annotation, EntityDefinition &$entityMetadata, $embedded=false, $primaryKeyOnly = false)
    {
        if ($annotation->primary == $primaryKeyOnly) {
            // set column data
            if (! empty($entityMetadata['versionTable']) && $annotation->versioned) {
                $entityMetadata['versionTable']['columns'][] = $this->generateColumn($name, $annotation);
            } else {
                $entityMetadata['table']['columns'][] = $this->generateColumn($name, $annotation);
            }

            // set up version feature
            if (! empty($entityMetadata['versionTable']) && ! $annotation->versioned && $annotation->primary) {
                $this->generateVersionTable($name, $annotation, $entityMetadata);
            }
        }

        return $this->generateAttribute($name, $annotation);
    }
protected function parseColumn($name, Annotation $annotation, EntityDefinition &$entityMetadata, $embedded=false, $primaryKeyOnly = false)
    {
        if ($annotation->primary == $primaryKeyOnly) {
            // set column data
            if (! empty($entityMetadata['versionTable']) && $annotation->versioned) {
                $entityMetadata['versionTable']['columns'][] = $this->generateColumn($name, $annotation);
            } else {
                $entityMetadata['table']['columns'][] = $this->generateColumn($name, $annotation);
            }

            // set up version feature
            if (! empty($entityMetadata['versionTable']) && ! $annotation->versioned && $annotation->primary) {
                $this->generateVersionTable($name, $annotation, $entityMetadata);
            }
        }

        return $this->generateAttribute($name, $annotation);
    }
protected function parseColumn ( $ name , Annotation $ annotation , EntityDefinition & $ entityMetadata , $ embedded = false , $ primaryKeyOnly = false ) { if ( $ annotation -> primary == $ primaryKeyOnly ) { // set column data if ( ! empty ( $ entityMetadata [ 'versionTable' ] ) && $ annotation -> versioned ) { $ entityMetadata [ 'versionTable' ] [ 'columns' ] [ ] = $ this -> generateColumn ( $ name , $ annotation ) ; } else { $ entityMetadata [ 'table' ] [ 'columns' ] [ ] = $ this -> generateColumn ( $ name , $ annotation ) ; } // set up version feature if ( ! empty ( $ entityMetadata [ 'versionTable' ] ) && ! $ annotation -> versioned && $ annotation -> primary ) { $ this -> generateVersionTable ( $ name , $ annotation , $ entityMetadata ) ; } } return $ this -> generateAttribute ( $ name , $ annotation ) ; }
Parse a column.

@param string $name
@param \ProAI\Datamapper\Annotations\Annotation $annotation
@param \ProAI\Datamapper\Metadata\Definitions\Class $entityMetadata
@param boolean $embedded
@return \ProAI\Datamapper\Metadata\Definitions\Attribute
Parse a column .