Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6794011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:10:13+00:00 2026-05-26T18:10:13+00:00

I was looking at porting a small side project over to use Mongo, as

  • 0

I was looking at porting a small side project over to use Mongo, as it was getting more and more time consuming using Nhibernate for the current scenario.

I gave NoRM a try originally, and that had a branch which had support from cyclic references and worked fine, however I cannot find any documentation to indicate if the official c# driver supports it.

The situation and why I have a cyclic reference is because I have a location object, which contains a list of roads, each road has a link to another location. It is quite similar to a simple set of nodes in a pathfinder.

public class Location
{
    public int Id { get; set; }
    public string Name { get; set; }
    public IList<Road> Roads { get; set; }
}

public class Road
{
    public Location From { get; set; }
    public Location To { get; set; }
}

Now the problem is I have a whole world built up out of these objects (they have more properties in the real scenario) and they all interlink, however without being able to handle cyclic references I am not sure how I can solve this problem, as each road needs to know a start and an end point.

I know one compromise is to just get rid of the location object, and instead have an Id that references the location, but then I have to query each sub location individually. This is only done once and then kept in memory as there is a huge map that contains all possible locations and all possible routes so quick paths can be found between points.

It may be a case of the Location and Roads are not suitable for a document storage approach and can be stored another way…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:10:14+00:00Added an answer on May 26, 2026 at 6:10 pm

    The official C# driver doesn’t really support “references” at all. The value of a field can be an ObjectID, but the concept of joins or references is not really implemented in the official C# driver.

    Of course, even with “reference” support, these drivers would still be executing multiple queries.

    It may be a case of the Location and Roads are not suitable for a document storage approach and can be stored another way…

    Given the cases you’ve described, I would suggest looking at a graph database. There are several popular ones including Neo4J, Microsoft’s Trinity, sones’ GraphDB and a host of others.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking to do a very small, quick 'n dirty side project. I like the
I have been looking at the feasibility of porting over an intranet web app
I am porting some code over to the iPad and targeting 3.2. I'm using
We are looking at various options in porting our persistence layer from Oracle to
I was looking at a job posting requesting a desired knowledge of: Client side
Looking at the C# project templates in VS2008 and the offerings are WPF User
I'm looking at porting my projects to Git from SVN (I'm convinced that Git
I'm looking at porting an Interbase 6 / Delphi 7 application to embedded Firebird
I am working on porting a Java codebase to Cocoa/Objective-C for use on desktop
I'm looking to create a small C# application that will either run as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.