MongoDB datensatz #32
Replies: 4 comments
-
Hallo Tom, ich verstehe nicht was dein Ziel ist und wie du versuchst dahin zu kommen. Beschreibe bitte welche Datentypen du hast, wie diese miteinander verknüpft sind und wie du versuchst Daten zu populieren. |
Beta Was this translation helpful? Give feedback.
-
Hier zumindest mal ein Link zu Vergleich das mal mit deinem code. (achte speziell auf das Story.
findOne({ title: 'Casino Royale' }).
populate('author').
exec(function (err, story) {
if (err) return handleError(err);
// Story is now populated
// Do something i.e. send a response
response.status(200).json(story);
}); Wie schon von @ThomasF85 erwähnt brauchen wir einen Link zum code um einzuschätzen warum die Daten nicht "populated" werden. |
Beta Was this translation helpful? Give feedback.
-
Falls keine der Antworten (meine oder die von @ThomasF85 die Lösung waren, kannst du gerne eine eigene schreiben und diese dann als Antwort markieren) Sollte diese Frage nicht durch ein Kommentar zu beantworten, dennoch schon gelöst sein, würde ich sie löschen. Vielen Dank |
Beta Was this translation helpful? Give feedback.
-
ne sorry hat nicht geholfen, aber danke für die mühe, kann geschlossen werden! |
Beta Was this translation helpful? Give feedback.
-
Hallo zusammen,
Ist dieses (siehe Bild) möglich.
Ich möchte bei currentresources und buildings, über die id auf die resources/buildingtype
populaten
das klappt soweit, Problem ist gerade der Value 0 wird nicht mitgenommen, egal in welcher schreibweiße ich das einfüge. hab auch leider nichts im netz gefunden.Ziel -> wenn ich die Stadt fetch sollen mit die Infos zurückgegeben werden + die aktuellen resourcen + level, (das wäre der value = 0 (rechts screen))dieses ist aber jetzt gerade so nicht möglich.
danke für die Hilfe.
Beta Was this translation helpful? Give feedback.
All reactions