Another shxtty nHibernate error

Author: Jon aka Poor Guy / Labels:

Last Tuesday, one of the Facilities.Net lady email me saying the application is not working. I looked at it and test it out without any problems. So I thought it's just a glitch and put it aside as I was crazy busy last week.

Then on Friday, the same lady emailed me again complaining the app still gave her the famous yellow screen asp.net error. I was not at office that day (it's my Friday off). So I just told her I would get back to her on Monday.

Fun begins. When I first stepped in the office, one of the web services I wrote last week broke the new hire InfoPath form. So I fixed it all morning and then the lady reminded me to fix her problem.

I fixed the web service shxt then loaded up the Facilities.Net and tried to figure out what's wrong with it. Boy oh boy... I just had no clue what went wrong. I even went to her office to try it out myself.

After talking to my supervisor, who actually wrote the app, he looked into the database and the error msg. Then suddenly he clicked and figured out where the problem could be and told me to look into it. Good times. So I digged through the database and found that there's ONE fxxking record in the Building table didn't have a Floor assigned to it.

In a normal asp.net application, it wouldn't matter much. But in nHibernate, this is one big fxxking problem. Shxt are loaded in cache. If 1 thing went wrong, the whole application blow up. So I inserted a Floor manually and everything went back to normal. Good times, good times.

nHibernate = POS, strongly not recommended, especially in web application, which supposed to be stateless.

0 comments: