sql >> Database >  >> NoSQL >> MongoDB

Ember-gegevens hiërarchie op meerdere niveaus met ingesloten altijd

Er zijn nog enkele bugfixes in ember-rails:we hebben geleden vanwege de functie

extractEmbeddedBelongsTo: function(loader, relationship, data, parent, prematerialized)     {
var reference = this.extractRecordRepresentation(loader, relationship.type, data, true);
prematerialized[relationship.key] = reference;

// If the embedded record should also be saved back when serializing the parent,
// make sure we set its parent since it will not have an ID.
var embeddedType = this.embeddedType(parent.type, relationship.key);
if (embeddedType === 'always') {
  reference.parent = parent;
}

}

BelongsTo-relatie slaat de extractie van ingesloten objecten over. De verkeerde is hier:

extractEmbeddedBelongsTo: function(loader, relationship, data, parent, prematerialized) {
var reference = loader.sideload(relationship.type, data);
prematerialized[relationship.key] = reference;

// If the embedded record should also be saved back when serializing the parent,
// make sure we set its parent since it will not have an ID.
var embeddedType = this.embeddedType(parent.type, relationship.key);
if (embeddedType === 'always') {
  reference.parent = parent;
}

}




  1. Hoe maak je een Mongo Docker-afbeelding met standaardverzamelingen en -gegevens?

  2. Redis Vue-bureaublad

  3. Hoe spring boot app redis en spring boot session global redis te isoleren

  4. Mongo veld A groter dan veld B