Questions tagged [object-graph]
90 questions
5
votes
0 answers
Can someone explain File Owner in iOS
Apologies in advance for this question, though it's been discussed at length since iOS came out. But I still don't get it, despite my best efforts. The closest image I can picture is "frozen and dried object graph", which is fine, but that doesn't…

Alex
- 1,581
- 1
- 11
- 27
4
votes
2 answers
Core Data Alternatives on iOS
I've been developing several iOS applications using Core Data and it has been an excellent framework to work with. However, I've encountered an issue whereby we more or less have distributed objects (synced) across multiple platforms. A web/database…

Dave Finster
- 88
- 5
4
votes
1 answer
Best Way to Store Contextual Attributes in Core Data?
I am using Core Data to store objects. What is the most efficient possibility for me (i.e. best execution efficiency, least code required, greatest simplicity and greatest compatibility with existing functions/libraries/frameworks) to store…

anniina
- 199
- 1
- 11
4
votes
2 answers
Rails 3: Escape characters (\) appearing in part of JSON string
Anyone know why some of my json elements are being backslash(\) escaped while others are…

Meltemi
- 37,979
- 50
- 195
- 293
4
votes
1 answer
Ignore internal properties in ShouldBeEquivalentTo
Is there a way to ignore internal properties of a class when doing ShouldBeEquivalentTo?
For example, in the class below I want to exclude the MetaData property from the object graph comparison.
public class SomeObject
{
Public string…

Lejdholt
- 532
- 7
- 21
4
votes
2 answers
Is it in some scenarios impossible to create immutable object graphs?
I'm aware that immutability is not always the holy grail. However, since I'm learning Scala for quite a while now, I always try to find an immutable solution at first, especially when it comes to pure "data objects".
I'm currently in the progress…

fxlae
- 905
- 8
- 17
4
votes
3 answers
How do I find cycles in my object hierarchy?
There is a class Company, which has reference to another instance of Company to represent the parent. Lets say there are four companies c1, c2, c3 & c4 and c2, c3, c4 has parent company set as c1.
For example:
public class Company {
public Company…

Mukesh Kumar
- 945
- 4
- 11
- 26
4
votes
2 answers
Optimal way to persist an object graph to flash on the iPhone
I have an object graph in Objective-C on the iPhone platform that I wish to persist to flash when closing the app. The graph has about 100k-200k objects and contains many loops (by design). I need to be able to read/write this graph as quickly as…

teabot
- 15,358
- 11
- 64
- 79
3
votes
1 answer
Should CoreData inverse relationships be represented as retained properties?
I have two entities (Session and User). Session entity has loggedInUser relationship to User entity. And the User entity has session inverse relationship to Session entity.
Xcode generates properties with retain attribute for both direct and inverse…

Mikayel Aghasyan
- 225
- 2
- 11
3
votes
3 answers
.NET Binary Serialize object with references to other objects . . . what happens?
If you have an object instance A that references other objects (for example instances B and C), and you binary serialize A to a file, what happens? Do you now have serialized data that includes A, B and C?
How does it work exactly? What will I get…

richard
- 12,263
- 23
- 95
- 151
3
votes
1 answer
Prevent EF from saving full object graph
I have a model as below
public class Lesson
{
public int Id { get; set; }
public Section Div { get; set; }
}
public class Section
{
public int Id { get; set; }
public string Name { get; set; }
}
I also have DB Context as…

Sisyphus
- 900
- 12
- 32
3
votes
2 answers
Self referencing loop detected in ASP.Net Core 1.1 Solution
Though I have followed the article here I keep getting the error
self referencing loop detected for property '...' with type '...'. Path '[4]....[0]'.
I have added this to my Startup.cs:
services.AddMvc()
.AddJsonOptions(opt =>
…

mJay
- 713
- 3
- 11
- 23
3
votes
1 answer
StructureMap HowTo: Conditional Construction on Deep Object
I'm having difficulty conditionally creating a dependency. Googling, I have yet to find a good example of using the BuildStack and Conditional Predicates.
Here's what I'm doing in the Registry:
//snip
public SomeRegistry()
{
…

Brett Veenstra
- 47,674
- 18
- 70
- 86
3
votes
4 answers
Elegant way to implement a navigable graph?
This is a design problem. I'm struggling to create a conceptual model for a problem I'm facing.
I have a graph of a number of objects (<1000). These objects are connected together in a myriad of ways. Each of these objects have some attributes.
I…

Kshitiz Sharma
- 17,947
- 26
- 98
- 169
3
votes
2 answers
JSON.NET silently ignores circular references and sets arbitrary links in the chain to null to resolve them
I'm trying to serialize an object graph in JSON.NET in which a Galaxy contains StarSystems, a StarSystem contains Planets, a Planet contains a Colony, a Colony has an Owner, and the Galaxy also has a list of Empires, each of which has a list of…

ekolis
- 6,270
- 12
- 50
- 101