views:

149

answers:

2

I'm trying to get NHibernate to load some records for me (it's been partially set up, and is used for some other parts of the app already), and while working on an <any> mapping, I got this exception:

[InvalidOperationException: any types do not have a unique referenced persister]

Can somebody help me parse what they mean by this? I can think of many completely different meanings for this sentence. I can interpret the first part as:

  • types declared with <any> are not allowed to have a URP, but yours do
  • types declared with <any> must have a URP, but yours don't
  • any of your program's types should ...

And with any of these, I can see the second part as:

  • you have more than one persister, but only one is allowed
  • you have no persister, but one is required
  • you have one, but failed to reference it correctly

(Yeah, I'm unclear on much of their terminology still, but usually when I'm unclear on some parts, error messages are at least clear enough that I can figure out what they mean by context. And the exception points to the entry point into NHibernate, not a bad mapping in my .hbm.xml file or a property in a specific class.)

I've looked at the API docs, but they seem completely unhelpful here.

thanks!

A: 

I interpret that as your first bullet point does; I do not understand your question about the "second part".

McWafflestix
"Unique" tends to mean "one" -- do I have none, or more than one? Or maybe the problem is that it's not "referenced", and who's doing the referencing? (I can't find an NHibernate glossary, and google isn't turning up much for these terms.) It's like playing a game of 20 questions: "Is it a red car in the driveway with a broken headlight?" "No." All I know is that it didn't pass all 3 stated conditions, but not which one (or all) weren't met.
Have you tried looking in the nHibernate source code?
McWafflestix
I've given up on NHibernate for now, but: yes. This exception is thrown as the only line of a method in an undocumented abstract class, IIRC, which doesn't give much clue as what to do to avoid it.
Yeah, that's not remarkably clear. Sorry to hear it.
McWafflestix
A: 

This post may be helpful for you.

http://www.mail-archive.com/[email protected]/msg04232.html

-Doug

Doug