Archive

Archive for October, 2008

NHibernate exceptions

October 14th, 2008

After hours of travel, our hero finds himself suddenly in the midst of dark woods. Nailed to a tree there is a wooden sign, weather-beaten by the ages. It reads:

"Invalid Cast (check your mapping for property type mismatches); setter of classname"

Right besides the sign stands NHibernate, its expression unreadable. Our hero, unsure of which path to take, asks for directions as to what to fix.

NHibernate: “The problem lies…” – sweeps hand widely at the class – “that way”
Ricardo: “Where? Which way?”
NHibernate: “In a property…”
Ricardo: “Of course, all it has are properties! Which one?”
NHibernate: “No… I’m afraid I’ve said too much”

Ricardo Programming