orm: fix multi substructs (#9941)

This commit is contained in:
Louis Schmieder 2021-05-04 11:35:18 +02:00 committed by GitHub
parent 92a22e9ec5
commit b8e070b2a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 88 additions and 16 deletions

View file

@ -19,9 +19,9 @@ struct User {
}
struct Parent {
id int [primary; sql: serial]
name string
chields []Chield [fkey: 'parent_id']
id int [primary; sql: serial]
name string
children []Chield [fkey: 'parent_id']
}
struct Chield {
@ -48,7 +48,7 @@ fn sqlite3_array() {
par := Parent{
name: 'test'
chields: [
children: [
Chield{
name: 'abc'
},
@ -90,7 +90,7 @@ fn mysql_array() {
par := Parent{
name: 'test'
chields: [
children: [
Chield{
name: 'abc'
},
@ -129,7 +129,7 @@ fn psql_array() {
par := Parent{
name: 'test'
chields: [
children: [
Chield{
name: 'abc'
},