The best Way to Reference two Collections in One database?
Hello together,
after hours of reading or trying, i leave the path of sureness if my way is the correct way. Now i thought, ask the experts and listen to what they recommend.(Sorry about the english grammatics...by the way).
Like the Topic says: I want to reference a Collection to another Collection.
My Issue is i dont know which way is the bettest and i dont know how to do it. Is it possible that you give me some impuls so that i get on the right way? I think there is no right way or truth or like bla bla, thats the interesting thing on programming... ![]()
Codelines i've tried:
//2 Collections in my DB(DBNAME = "realife20"
// testcollection with field "testid"
//childcollection with field "childid", "sento", "sentfrom", "text"
realife20.test.insert ( { //databasename.collection.insert
"testid": 12345,
"childid": "1",
"sento": "torreto",
"sentfrom": "sam",
"text": "funktioniert die referenzierung?"
}
)
;
I know that this code has no refer string or something like that. does the commands $ref, $db, $id work in appery.io? As i tryd i got no results...
like you can see, there are fixed values in the code. The reason for this is, i want to try, if this sort of code works over the "Run Javascript"-Action in the Event's. Nothing happens, but it can also be the code.
I look forward to your answers and appreciate ![]()
Greets from Germany