mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
orm: fix multi substructs (#9941)
This commit is contained in:
parent
92a22e9ec5
commit
b8e070b2a1
5 changed files with 88 additions and 16 deletions
|
@ -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'
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue