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

  • SEARCH
  • Home
  • 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 6345445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:49:25+00:00 2026-05-24T20:49:25+00:00

Yo – this is not a ravendb issue per se – it’s another design

  • 0

Yo – this is not a ravendb issue per se – it’s another design question
pertaining to document dbs in general.

So I’ve been using DenormalizedReference quite a bit and it has
just occured to me that in a lot of places this makes DDD rather hard.

So, say for instance i have an object that has a child collection:

 List<DenormalizedReference<SomeType>>

This child collection is created when the parent is instanciated with
an overloaded constructor accepting a List<SomeOtherType>

now – in the ctor i’d like to create this list from the SomeOtherType
collection being passed in – which means i will need to create a new
SomeType for each SomeOtherType.

Without passing in the DocumentSession into my domain – which i’m not
going to do – this wont work because when the parent AR is saved we
lose the properties on each child object except for Id and Name

How is everyone else handling this?

  • 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-24T20:49:29+00:00Added an answer on May 24, 2026 at 8:49 pm

    You can’t do that.
    Or rather, you shouldn’t do that.

    There are several ways to resolve this, usually using a static gateway to get the session, but the problem is that this approach creates a lazy loaded collection, with all the problems that this have.

    RavenDB was specifically designed to avoid this sort of issues. And you can include items to avoid going back to the server, but you shouldn’t try to move between ids and types transparently like that.

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

Sidebar

Related Questions

My NSXMLParser breaks on this string: <title>AAA &#8211; BCDEFGQWERTYUIO</title> I parsed it in this
I'm trying to craft a Java regular expression to split strings of the general
i have this code: <?php $valid_ext = array(pdf, doc); $args = array( 'post_type' =>
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
An extension to my previous question: Text cleaning and replacement: delete \n from a
I was beta-testing my iPhone App (not through xcode), and the app crashed. I
I need a function that will clean a strings' special characters. I do NOT
So to start, I have an array of XML files. These files need to
I would like to count the length of a string with PHP. The string
I've got the following login script.. <?php $name = $_POST[name]; $password = $_POST[password]; $query

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.