{"action":"created","issue":{"url":"https://api.github.com/repos/graphaware/neo4j-php-ogm/issues/30","repository_url":"https://api.github.com/repos/graphaware/neo4j-php-ogm","labels_url":"https://api.github.com/repos/graphaware/neo4j-php-ogm/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/graphaware/neo4j-php-ogm/issues/30/comments","events_url":"https://api.github.com/repos/graphaware/neo4j-php-ogm/issues/30/events","html_url":"https://github.com/graphaware/neo4j-php-ogm/issues/30","id":186622340,"number":30,"title":"Error on create node with relationshipEntity","user":{"login":"m33ch","id":1915008,"avatar_url":"https://avatars.githubusercontent.com/u/1915008?v=3","gravatar_id":"","url":"https://api.github.com/users/m33ch","html_url":"https://github.com/m33ch","followers_url":"https://api.github.com/users/m33ch/followers","following_url":"https://api.github.com/users/m33ch/following{/other_user}","gists_url":"https://api.github.com/users/m33ch/gists{/gist_id}","starred_url":"https://api.github.com/users/m33ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m33ch/subscriptions","organizations_url":"https://api.github.com/users/m33ch/orgs","repos_url":"https://api.github.com/users/m33ch/repos","events_url":"https://api.github.com/users/m33ch/events{/privacy}","received_events_url":"https://api.github.com/users/m33ch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-01T19:20:50Z","updated_at":"2016-11-11T21:37:05Z","closed_at":null,"body":"Hi, \r\n\r\nwhen i try to create a node with `relationshipEntity` receive this errors \r\n\r\n```\r\nExpected node.props to be a map, but it was :`[]`\r\n```\r\n\r\nI have these model:\r\n\r\n**User**\r\n```\r\n/**\r\n * @OGM\\Node(label=\"User\")\r\n */\r\nclass User\r\n{\r\n    /**\r\n     * @OGM\\GraphId()\r\n     * @var int\r\n     */\r\n    protected $id;\r\n\r\n    /**\r\n     * @OGM\\Property(type=\"string\")\r\n     * @var string\r\n     */\r\n    protected $first_name;\r\n\r\n    /**\r\n     * @OGM\\Property(type=\"string\")\r\n     * @var string\r\n     */\r\n    protected $last_name;\r\n\r\n    /**\r\n     * @OGM\\Property(type=\"string\")\r\n     * @var int\r\n     */\r\n    protected $email;\r\n\r\n    /**\r\n     * @OGM\\Property(type=\"boolean\")\r\n     * @var boolean\r\n     */\r\n    protected $active;\r\n\r\n    /**\r\n     * @OGM\\Property(type=\"string\")\r\n     * @var int\r\n     */\r\n    protected $password;\r\n\r\n    /**\r\n     * @OGM\\Relationship(relationshipEntity=\"Manager\", type=\"MANAGE\", direction=\"OUTGOING\", collection=true)\r\n     * @var ArrayCollection|Page[]\r\n     */\r\n    protected $pages;\r\n\r\n    public function __construct($first_name, $last_name, $email, $password, $active)\r\n    {\r\n        $this->first_name = $first_name;\r\n        $this->last_name = $last_name;\r\n        $this->email = $email;\r\n        $this->password = bcrypt($password);\r\n        $this->active = $active;\r\n        $this->pages = new ArrayCollection();\r\n    }\r\n\r\n    /**\r\n     * @param Page $page\r\n     * @param OGM\\Entity $entity\r\n     */\r\n    public function addPage(Page $page, OGM\\Entity $entity)\r\n    {\r\n        $this->pages->add(new Manager($this, $page, $entity));\r\n    }\r\n}\r\n```\r\n\r\n**Manager**\r\n```\r\n/**\r\n * @OGM\\RelationshipEntity(type=\"MANAGE\")\r\n */\r\nclass Manager\r\n{\r\n    /**\r\n     * @OGM\\GraphId()\r\n     * @var int\r\n     */\r\n    protected $id;\r\n\r\n    /**\r\n     * @OGM\\StartNode(targetEntity=\"User\")\r\n     * @var User\r\n     */\r\n    protected $user;\r\n\r\n    /**\r\n     * @OGM\\EndNode(targetEntity=\"Page\")\r\n     * @var Page\r\n     */\r\n    protected $page;\r\n\r\n    protected $entity;\r\n\r\n    /**\r\n     * Manage constructor.\r\n     * @param User $user\r\n     * @param Page $page\r\n     * @param OGM\\Entity $entity\r\n     */\r\n    public function __construct(User $user, Page $page, OGM\\Entity $entity)\r\n    {\r\n        $this->user = $user;\r\n        $this->page = $page;\r\n        $this->entity = $entity;\r\n    }\r\n\r\n    /**\r\n     * @return int\r\n     */\r\n    public function getId()\r\n    {\r\n        return $this->id;\r\n    }\r\n\r\n    /**\r\n     * @param int $id\r\n     */\r\n    public function setId($id)\r\n    {\r\n        $this->id = $id;\r\n    }\r\n\r\n    /**\r\n     * @return User\r\n     */\r\n    public function getUser()\r\n    {\r\n        return $this->user;\r\n    }\r\n\r\n    /**\r\n     * @return Page\r\n     */\r\n    public function getPage()\r\n    {\r\n        return $this->page;\r\n    }\r\n\r\n    /**\r\n     * @return string\r\n     */\r\n    public function getEntity()\r\n    {\r\n        return $this->type;\r\n    }\r\n\r\n    /**\r\n     * @param OGM\\Entity $entity\r\n     * @internal param string $type\r\n     */\r\n    public function setEntity(OGM\\Entity $entity)\r\n    {\r\n        $this->entity = $entity;\r\n    }\r\n}\r\n```\r\n\r\n**Page**\r\n```\r\n/**\r\n * @OGM\\Node(label=\"Page\")\r\n */\r\nclass Page\r\n{\r\n    /**\r\n     * @OGM\\GraphId()\r\n     * @var int\r\n     */\r\n    protected $id;\r\n}\r\n```\r\n\r\n**Artist** (Entity)\r\n```\r\nclass Artist implements OGM\\Entity\r\n{\r\n    /**\r\n     * @OGM\\Property(type=\"string\")\r\n     * @var string\r\n     */\r\n    protected $name;\r\n\r\n    /**\r\n     * @OGM\\Property(type=\"string\")\r\n     * @var string\r\n     */\r\n    protected $slug;\r\n\r\n    /**\r\n     * @OGM\\Property(type=\"string\")\r\n     * @var string\r\n     */\r\n    protected $short_description;\r\n\r\n    /**\r\n     * @return string\r\n     */\r\n    public function getName()\r\n    {\r\n        return $this->name;\r\n    }\r\n\r\n    /**\r\n     * @param string $name\r\n     */\r\n    public function setName($name)\r\n    {\r\n        $this->name = $name;\r\n    }\r\n\r\n    /**\r\n     * @return string\r\n     */\r\n    public function getSlug()\r\n    {\r\n        return $this->slug;\r\n    }\r\n\r\n    /**\r\n     * @param string $slug\r\n     */\r\n    public function setSlug($slug)\r\n    {\r\n        $this->slug = $slug;\r\n    }\r\n\r\n    /**\r\n     * @return string\r\n     */\r\n    public function getShortDescription()\r\n    {\r\n        return $this->short_description;\r\n    }\r\n\r\n    /**\r\n     * @param string $short_description\r\n     */\r\n    public function setShortDescription($short_description)\r\n    {\r\n        $this->short_description = $short_description;\r\n    }\r\n}\r\n```\r\n\r\n**Example**\r\n```\r\n$artist = new Artist;\r\n$artist->setName('Artist Name');\r\n$artist->setSlug('artist-name');\r\n$artist->setShortDescription('This is a description');\r\n\r\n$this->user->addPage(new Page);\r\n\r\n$manager->persist($this->user);\r\n\r\n$manager->flush();\r\n```\r\n\r\nWhere am I doing wrong?\r\nThanks"},"comment":{"url":"https://api.github.com/repos/graphaware/neo4j-php-ogm/issues/comments/260061255","html_url":"https://github.com/graphaware/neo4j-php-ogm/issues/30#issuecomment-260061255","issue_url":"https://api.github.com/repos/graphaware/neo4j-php-ogm/issues/30","id":260061255,"user":{"login":"ikwattro","id":1222009,"avatar_url":"https://avatars.githubusercontent.com/u/1222009?v=3","gravatar_id":"","url":"https://api.github.com/users/ikwattro","html_url":"https://github.com/ikwattro","followers_url":"https://api.github.com/users/ikwattro/followers","following_url":"https://api.github.com/users/ikwattro/following{/other_user}","gists_url":"https://api.github.com/users/ikwattro/gists{/gist_id}","starred_url":"https://api.github.com/users/ikwattro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikwattro/subscriptions","organizations_url":"https://api.github.com/users/ikwattro/orgs","repos_url":"https://api.github.com/users/ikwattro/repos","events_url":"https://api.github.com/users/ikwattro/events{/privacy}","received_events_url":"https://api.github.com/users/ikwattro/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T21:37:05Z","updated_at":"2016-11-11T21:37:05Z","body":"@m33ch I could'nt reproduce this, adding your test it seems my db is ok : \r\n\r\nhttps://github.com/graphaware/neo4j-php-ogm/commit/e1ca8e8ecb85ff87c9888dcbc2148117accb64b3\r\n\r\n\r\n![screen shot 2016-11-11 at 22 36 47](https://cloud.githubusercontent.com/assets/1222009/20231040/5e2965b4-a85f-11e6-80ae-142c712f62f9.png)\r\n"}}
{"actor":{"display_login":"ikwattro"}}