我在环回时遇到了一些麻烦。
我试图将foreignKey的HasMany关系设置为STRING。 但它似乎没有正常工作。
所以看起来像这样:
TABLE_A
object(stdClass)#1 (5) {
["Date"]=>
string(37) "Wed, 7 Jun 2017 22:16:53 +1000 (AEST)"
["Driver"]=>
string(4) "imap"
["Mailbox"]=>
string(103) "{gmail-imap.l.google.com:993/imap/notls/ssl/readonly/user="test@test.com"}Hub Service Updates"
["Nmsgs"]=>
int(1234)
["Recent"]=>
int(0)
}
int(1234)
表B
{
"name": "TABLE_A",
"base": "PersistedModel",
"idInjection": true,
"options": {
"validateUpsert": true
},
"properties": {
"label_a": {
"type": "string"
},
"code_a": {
"type": "string"
}
},
"validations": [],
"relations": {
"tablebs": {
"type": "hasMany",
"model": "TABLE_B",
"foreignKey": "code_a"
}
},
"acls": [],
"methods": {}
}