Commit 2cef2811 authored by François Agneray's avatar François Agneray
Browse files

Merge branch '3.1' of gitlab.lam.fr:anis/anis-server into 3.1

parents d72d5ff3 3c6bfe8c
......@@ -32,7 +32,7 @@ class Attribute implements \JsonSerializable
* @var App\Entity\Dataset
*
* @Id
* @ManyToOne(targetEntity="Dataset")
* @ManyToOne(targetEntity="Dataset", inversedBy="attributes")
* @JoinColumn(name="dataset_name", referencedColumnName="name", nullable=false)
*/
protected $dataset;
......
......@@ -107,6 +107,13 @@ class Dataset implements \JsonSerializable
* @JoinColumn(name="id_dataset_family", referencedColumnName="id", nullable=true)
*/
protected $datasetFamily;
/**
* @var Anis\Entity\Attribute[]
*
* @OneToMany(targetEntity="Attribute", mappedBy="dataset", cascade={"remove"})
*/
protected $attributes;
public function __construct($name)
{
......@@ -229,6 +236,11 @@ class Dataset implements \JsonSerializable
$this->datasetFamily = $datasetFamily;
}
public function getAttributes()
{
return $this->attributes;
}
public function jsonSerialize()
{
return [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment