MongoDb Relationships (Day 4)

... Less than 1 minute

# MongoDb Relationships (Day 4)

# What is a virtual property?

Virtual properties are additional fields for a given model. Their values can be set manually or automatically with defined functionality. A common virtual property is the full name of a person, composed of user's first and last name. Virtual properties don't persist through the database. They only exist logically and are not written to the document's collection.

# When might you use a virtual property?

You might use a virtual property when you want to fetch certain data without creating an actual object. You can mimic an objects property.

# How do you search by a virtual properties value?

# Afternoon Challenge

Hackathon Prep

Last update: September 23, 2021 04:13