Skip to content

Entity inheritance #21

Description

@Simatica-Gianluca

Entity inheritance is provided?
I have a base entity with some property like ID

class BaseEntity
{
/**
* @Orm\Column(type="bigint")
* @Orm\id
* @Orm\GeneratedValue(strategy="AUTO")
*/
protected $id;

...
}

and a User entity wich inherit from BaseEntity

/**

  • @Orm\Entity
    /
    class User extends BaseEntity
    {
    /
    *
    • @Orm\Column(type="string", length=64, unique=true, nullable=false)
      */
      protected $Login;

...
}


	$productParser = new DoctrineParser(
		\bla\bla\User::class,
		[
			'id'     =>'id',
			'Login'  =>'Login',
		],

DoctrineParser tell me
Fatal error: Uncaught FL\QBJSParser\Exception\Parser\Doctrine\FieldMappingException: Property id is not accessible in in bla\bla\User

i think is because the only root entity is User, all other entity in fieldPrefixesToClasses must be relation many-to-* with User.

like this (in
FROM bla\bla\User object LEFT JOIN object.SUBENTITY object_SUBENTITY ecc. ecc.

How can we include properties from base classes in filter ?
thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions