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

#65 => done

parent e7096a5e
Pipeline #4937 passed with stages
in 2 minutes and 36 seconds
......@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- #61: Docker images are stored on the gitlab internal registry
- #63: Update composer.json dependencies and using php version 8
- #65: Delete cascade (instance, dataset, group, settings_select)
## [3.5.0]
### Added
......
......@@ -33,7 +33,7 @@ class Attribute implements \JsonSerializable
*
* @Id
* @ManyToOne(targetEntity="Dataset", inversedBy="attributes")
* @JoinColumn(name="dataset_name", referencedColumnName="name", nullable=false)
* @JoinColumn(name="dataset_name", referencedColumnName="name", nullable=false, onDelete="CASCADE")
*/
protected $dataset;
......
......@@ -45,7 +45,7 @@ class CriteriaFamily implements \JsonSerializable
* @var Anis\Entity\Dataset
*
* @ManyToOne(targetEntity="Dataset")
* @JoinColumn(name="dataset_name", referencedColumnName="name", nullable=false)
* @JoinColumn(name="dataset_name", referencedColumnName="name", nullable=false, onDelete="CASCADE")
*/
protected $dataset;
......
......@@ -103,14 +103,14 @@ class Dataset implements \JsonSerializable
* @var Anis\Entity\DatasetFamily
*
* @ManyToOne(targetEntity="DatasetFamily", inversedBy="datasets")
* @JoinColumn(name="id_dataset_family", referencedColumnName="id", nullable=false)
* @JoinColumn(name="id_dataset_family", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
protected $datasetFamily;
/**
* @var Anis\Entity\Attribute[]
*
* @OneToMany(targetEntity="Attribute", mappedBy="dataset", cascade={"remove"})
* @OneToMany(targetEntity="Attribute", mappedBy="dataset")
*/
protected $attributes;
......
......@@ -47,14 +47,14 @@ class DatasetFamily implements \JsonSerializable
* @var Anis\Entity\Instance
*
* @ManyToOne(targetEntity="Instance", inversedBy="datasetFamilies")
* @JoinColumn(name="instance_name", referencedColumnName="name", nullable=false)
* @JoinColumn(name="instance_name", referencedColumnName="name", nullable=false, onDelete="CASCADE")
*/
protected $instance;
/**
* @var Anis\Entity\Dataset[]
*
* @OneToMany(targetEntity="Dataset", mappedBy="datasetFamily", cascade={"remove"})
* @OneToMany(targetEntity="Dataset", mappedBy="datasetFamily")
*/
protected $datasets;
......
......@@ -38,7 +38,7 @@ class Group implements \JsonSerializable
* @var Anis\Entity\Instance
*
* @ManyToOne(targetEntity="Instance")
* @JoinColumn(name="instance_name", referencedColumnName="name", nullable=false)
* @JoinColumn(name="instance_name", referencedColumnName="name", nullable=false, onDelete="CASCADE")
*/
protected $instance;
......@@ -48,8 +48,8 @@ class Group implements \JsonSerializable
* @ManyToMany(targetEntity="Dataset")
* @JoinTable(
* name="groups_datasets",
* joinColumns={@JoinColumn(name="group_id", referencedColumnName="id")},
* inverseJoinColumns={@JoinColumn(name="dataset_name", referencedColumnName="name")}
* joinColumns={@JoinColumn(name="group_id", referencedColumnName="id", onDelete="CASCADE")},
* inverseJoinColumns={@JoinColumn(name="dataset_name", referencedColumnName="name", onDelete="CASCADE")}
* )
*/
protected $datasets;
......
......@@ -52,7 +52,7 @@ class Instance implements \JsonSerializable
/**
* @var Anis\Entity\DatasetFamily[]
*
* @OneToMany(targetEntity="DatasetFamily", mappedBy="instance", cascade={"remove"})
* @OneToMany(targetEntity="DatasetFamily", mappedBy="instance")
*/
protected $datasetFamilies;
......
......@@ -52,7 +52,7 @@ class Option implements \JsonSerializable
* @var Anis\Entity\Select
*
* @ManyToOne(targetEntity="Select", inversedBy="options")
* @JoinColumn(name="select_name", referencedColumnName="name", nullable=false)
* @JoinColumn(name="select_name", referencedColumnName="name", nullable=false, onDelete="CASCADE")
*/
protected $select;
......
......@@ -45,7 +45,7 @@ class OutputCategory implements \JsonSerializable
* @var Anis\Entity\OutputFamily
*
* @ManyToOne(targetEntity="OutputFamily")
* @JoinColumn(name="output_family", referencedColumnName="id", nullable=false)
* @JoinColumn(name="output_family", referencedColumnName="id", nullable=false, onDelete="CASCADE")
*/
protected $outputFamily;
......
......@@ -45,7 +45,7 @@ class OutputFamily implements \JsonSerializable
* @var Anis\Entity\Dataset
*
* @ManyToOne(targetEntity="Dataset")
* @JoinColumn(name="dataset_name", referencedColumnName="name", nullable=false)
* @JoinColumn(name="dataset_name", referencedColumnName="name", nullable=false, onDelete="CASCADE")
*/
protected $dataset;
......
......@@ -36,7 +36,7 @@ class Select implements \JsonSerializable
/**
* @var Anis\Entity\Option[]
*
* @OneToMany(targetEntity="Option", mappedBy="select", cascade={"remove"})
* @OneToMany(targetEntity="Option", mappedBy="select")
*/
protected $options;
......
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