Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with annotations #109

Open
petrosd7 opened this issue Dec 19, 2016 · 1 comment
Open

Bug with annotations #109

petrosd7 opened this issue Dec 19, 2016 · 1 comment

Comments

@petrosd7
Copy link

petrosd7 commented Dec 19, 2016

I am trying to integrate the data mapper into yii2 and i have the following error

[Semantical Error] The annotation "@HireVoice\Neo4j\Annotation\Entity" in class common\models\neo4j\AppointmentType does not exist, or could not be auto-loaded.

I have declared the model as below:

_<?php

namespace common\models\neo4j;

use Yii;
use common\models\neo4j\BaseModel;
use HireVoice\Neo4j\Annotation as OGM;
use Doctrine\Common\Collections\ArrayCollection;

/**

  • The class for AppointmentType

  • @ogm\Entity(labels="AppointmentType")
    /
    class AppointmentType extends BaseModel
    {
    /
    *

    • @ogm\Auto
      */
      protected $id;

    /**

    • @ogm\Property(format="string")
    • @var string
      */
      public $title;

    /**

    • Gets the value of id.
    • @return mixed
      */
      public function getId()
      {
      return $this->id;
      }
      }_

What i am doing wrong

@lphuberdeau
Copy link
Owner

We use Doctrine annotations. Perhaps Yii2 uses something different or initializes it in an other way.

I have never worked with Yii2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants