Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
anis
anis-server
Commits
3c6bfe8c
Commit
3c6bfe8c
authored
Dec 17, 2019
by
François Agneray
Browse files
Add getAttributes method to the dataset class needed by searchAction
parent
7235d8af
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Entity/Attribute.php
View file @
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
;
...
...
src/Entity/Dataset.php
View file @
3c6bfe8c
...
...
@@ -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
[
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment