I am struggling to read data from a neo4j db. i use the entitymanager provided in the neo4j-php-ogm library.
$employeesRepository = $this->entityManager ->getRepository(Employee::class);
$employees = $employeesRepository->findAll();
return $employees;
i return this in json format and the output is: [{},{},{}]
this is my Employee entity class:
<?php
use GraphAware\Neo4j\OGM\Annotations as OGM;
/**
* @OGM\Node(label="Employee")
*/
class Employee{
/**
* @OGM\GraphId()
* @var int
*/
protected $id;
/**
* @OGM\Property(type="string")
* @var string
*/
protected $last_name;
/**
* @OGM\Property(type="string")
* @var string
*
*/
protected $first_name;
/**
* @return int
*/
public function getid(){
return $this->id;
}
/**
* @return string
*/
public function getlast_name(){
return $this->last_name;
}
/**
* @param string last_name
*/
public function setlast_name($param){
$this->last_name = $param;
}
/**
* @return string
*/
public function getfirst_name() {
return $this->first_name;
}
/**
* @param string first_name
*/
public function setfirst_name($param) {
$this->first_name = $param;
}
}
what am i missing?