syncRelationsFromQueryRow method

void syncRelationsFromQueryRow(
  1. Map<String, dynamic> rowRelations
)
inherited

Syncs relations from a QueryRow into this model's cache.

This is called internally after eager loading to make relations accessible directly on the model instance.

Example (internal use):

model.syncRelationsFromQueryRow(queryRow.relations);

Implementation

void syncRelationsFromQueryRow(Map<String, dynamic> rowRelations) {
  if (rowRelations.isEmpty) return;
  _ensureRelationMaps();
  for (final entry in rowRelations.entries) {
    _relationValues[this]![entry.key] = entry.value;
    _loadedRelations[this]!.add(entry.key);
  }
}