relationLoaded method
Checks if a relation has been loaded.
Returns true even if the loaded value is null or an empty list.
Example:
if (post.relationLoaded('author')) {
print('Author already loaded');
}
Implementation
bool relationLoaded(String name) {
final loaded = _loadedRelations[this];
return loaded != null && loaded.contains(name);
}