Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ef59422b8 | |||
| b49b216b36 | |||
| 13b28387c2 |
@ -240,6 +240,7 @@ For example, given a general `attachment` table containing a `kind` column (e.g.
|
||||
"type": "attachment",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"const": "cover"
|
||||
}
|
||||
}
|
||||
@ -252,10 +253,7 @@ A parent entity can then define a relationship using this constrained schema und
|
||||
"cover_attachment": {
|
||||
"properties": {
|
||||
"cover_attachment": {
|
||||
"type": [
|
||||
"cover.attachment",
|
||||
"null"
|
||||
]
|
||||
"type": "cover.attachment"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2461,11 +2461,13 @@
|
||||
"constraint": "fk_attachment_attachable_entity",
|
||||
"source_type": "attachment",
|
||||
"source_columns": [
|
||||
"attachable_id"
|
||||
"attachable_id",
|
||||
"attachable_type"
|
||||
],
|
||||
"destination_type": "entity",
|
||||
"destination_columns": [
|
||||
"id"
|
||||
"id",
|
||||
"type"
|
||||
],
|
||||
"prefix": "attachable"
|
||||
}
|
||||
|
||||
@ -621,9 +621,6 @@ impl<'a> Compiler<'a> {
|
||||
if edge.forward && relation.source_columns.len() > 1 {
|
||||
poly_col = Some(&relation.source_columns[1]); // e.g., target_type
|
||||
table_to_alias = &relation.source_type; // e.g., relationship
|
||||
} else if !edge.forward && relation.destination_columns.len() > 1 {
|
||||
poly_col = Some(&relation.destination_columns[1]); // e.g., source_type
|
||||
table_to_alias = &relation.destination_type; // e.g., relationship
|
||||
}
|
||||
|
||||
if let Some(col) = poly_col {
|
||||
|
||||
Reference in New Issue
Block a user