I appreciate that it may look like I'm asking a lot but I'm not asking as much as you might first think; it's just a little tough for me to conceptualise without some rudamentary example of what I am trying to achieve (hence the extensive code snippets). I've got the architecture and design down (at least conceptually), now I'm looking to see how I might leverage NHibernate given that concept.
Now, let me see if I can distill the concept/question into something wih a couple less paragraphs: Given an outer POCO object, with a collection member, where each item of the collection is a different inner POCO object (i.e. stored in different tables) that has a one-to-one relationship with the outer POCO (enforced by foreign primary keys), is there a way to configure NHibernate either so that it understands the join or that it will generate the SQL to query it, without the specific content of the collection member being known at design time? (Now, to me the above question seems harder to understand than that with the examples...) Your answer, 'probably not', is most likely the correct one, in which case NHibernate would not be suited for my specific needs. That's no biggie, it just means I won't be able to use it. I'm not trying to shoehorn in NHibernate where it will not fit, merely evaluating it considering my needs. If it were a specific issue I was addressing, I'm sure I could RTFM; the documentation is hardly incomplete and there are a wealth of articles out there covering many basic mapping issues. But having spent a couple of evenings Googling and not being able to break the question down into terse, boolean logic, I thought I'd try a higher form of human language interpretation. (And, of course, if I were required to use NHibernate and required to use composite objects, I would consider consulting hours from an expert NH developer; but for a proof-of-concept piece, not likely). On Aug 3, 1:32 am, Diego Mijelshon <[email protected]> wrote: > On Mon, Aug 2, 2010 at 19:03, jimbobmcgee <[email protected]>wrote: > > > > > A colleague of mine has been trying to convince me to use NHibernate > > in an upcoming project ... > > > [...unhelpful critique...] > > > Semantics aside, do you think this is something NHibernate could help > > me achieve? If so, what do you think would be the most elegant way to > > do it? > > Yes... No... Maybe. > Probably not. > > In any case (leaving acid humor aside for a second) you are asking for > architecture, design, guidance, and implementation all at once in a single > email. > We can help you with specific issues ("does NH support composite keys?" "how > do I eagerly load two collections?", "how would you map this inheritance > structure?") > If you need more than that, you should buy some consulting hours from any of > the expert NH developers around here. > > Diego -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
