-
-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy pathcustom-attributes.yaml
35 lines (34 loc) · 1 KB
/
custom-attributes.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
uses:
App\Attributes\MyAttribute: ~
types:
Book:
attributes:
- ORM\Entity: ~
- ApiResource: { routePrefix: '/library' }
- ORM\UniqueConstraint: { name: "isbn", columns: ["isbn"] }
- ORM\UniqueConstraint: { name: "title", columns: ["title"] }
- MyAttribute: ~
properties:
isbn: ~
title: { range: "https://schema.org/Text" }
author: { range: "https://schema.org/Text" }
description: ~
reviews:
mappedBy: book
cardinality: (1..*)
attributes:
ORM\OneToMany: { cascade: [persist, remove] }
ORM\OrderBy: { name: ASC }
0:
ORM\InverseJoinColumn: { name: "first_join_column" }
1:
ORM\InverseJoinColumn: { name: "second_join_column" }
Review:
properties:
book:
range: Book
inversedBy: reviews
cardinality: (*..1)
author: { range: "https://schema.org/Text" }
reviewBody: ~
rating: { range: "https://schema.org/Integer" }