Inheritance/Relationships
See original GitHub issueI can’t seem to get my sub-document to save under it’s parent.
var settings = new AlertSettings();
settings.Recipients.Add(new EmailRecipient());
using (var db = new LiteEngine(_dbPath))
{
Collection<AlertSettings> col = db.GetCollection<AlertSettings>("alertSettings");
col.EnsureIndex(t => t.Id);
col.Insert(settings);
Assert.That(col.FindOne(t => t.Id == settings.Id).Recipients.Count, Is.EqualTo(1)); //Assert fails
}
Am I doing something wrong?
Is it possible to load a many-to-many relationship? The appropriate keys are in the data store, I just need to be able to load them into the appropriate object.
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Inheritance (IS-A) vs. Composition (HAS-A) Relationship
In object-oriented programming, the concept of IS-A is a totally based on Inheritance, which can be of two types Class Inheritance or Interface ......
Read more >Inheritance (object-oriented programming)
The relationships of objects or classes through inheritance give rise to a directed acyclic graph. An inherited class is called a subclass of...
Read more >Introduction to the Inheritance Relationship: Python OOP ...
It is the relationship that allows you to define a class that inherits all the methods and attributes from other classes. The following...
Read more >10.2. Inheritance
UML class diagrams denote an inheritance relationship between two classes with an arrow with a outlined, three-sided head. Each class plays a specific...
Read more >Java inheritance vs. composition: How to choose
Inheritance and composition are two programming techniques developers use to establish relationships between classes and objects.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is the problem:
Properties can’t be
private set
- fastBinaryJson can’t deserialize private properties. Try use only{ get; set; }
Thanks now it works fine!