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 3806536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:51:03+00:00 2026-05-19T14:51:03+00:00

What does really POCO mean, in respect to dependencies ? With NHibernate; child collections

  • 0

What does really POCO mean, in respect to dependencies?

With NHibernate; child collections are retrieved as NHibernate.Collection.Generic.PersistentGenericBag<>. This is what I here mean by “dependencies”; If I try to save/update an object graph, the DAL will already have it’s “opinion” about what & how I’m trying to persist it.

Initially, I thought that requesting a POCO would carry no depencencies to the DAL, repository, ORM (unsure what is correct term in this perspective). But now I’m confused, as I’m thinking maybe it just means that the POCO class has no persistence methods; And that retrieving a POCO object graph may still carry such dependencies?

So when you talk about POCO, what do you really mean? Can a POCO have these type of dependencies, and if it may AND may not, how do you “by name” distinguish those?

A POCO that “has no such dependencies” seems more like a DTO, in some respect, but can have behavior, so it’s not a DTO after all.

Also, just to be 100% sure: I assume a DTO would be persistent ignorant AND have “no dependencies” ?

Maybe “dependencies” is not the proper word to use, so in case correct me. I hope my question is still comprehensible.


EDIT1:

With some further thinking; Maybe my assumption that the …PersistentGenericBag brought with it some “dependencies” is wrong (?) Probably it’s just a type, and nothing more magical. And further; that the only dependencies the objects have to NH, are via the ISessions, which of course, we have control over. Does that make sense?

  • 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-19T14:51:04+00:00Added an answer on May 19, 2026 at 2:51 pm

    POCO are classes that does not have any dependencies on frameworks or any other infrastructure class. Well, NHibernate DOES use the PersistentGenericBag but your POCO will only reference an IList class.

    For your POCO, it does’t matter if this instance will be a List, a ReadOnlyList or a PersistentGenericBag, he will treat it as an IList but will have other behaviour that is not up to him deal with.

    By the way, if you’re mapping your Domain Objets with annotations you know have a clearly dependency to the ORM.

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

Sidebar

Related Questions

This does not really apply to any language specifically, but if it matters I
Ok, question does not really make sense. Here is the situation. I have legacy
Does anyone know how to do this? I am really surprised at the scarce
I have a java class that does really heavy bit decoding and manipulation. This
The documentation is not talking really much about what this technically does. fadeInAnimation.fillMode =
I have a wordpress blog (this does not really matter i think). I have
It hurts to ask it here. It really does. Every time I search in
I just found CompletionService in this blog post . However, this does't really showcases
String(255) vs String(99999) When designing MySQL Columns, Does it really matter? I mean...I have
With that command what does really happen? telnet somehost 25 Does it mean that

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.