Thursday, November 15, 2007

Nhibernate and Composite Keys

I like using Nhibernate to do my object relational mapping. Although there is a large learning curve to the tool, once you use it a few times, mapping your objects become second nature, or that is what I thought until I had to map a database heavily using composite keys.

See for some reason when using composite keys NHibernate has trouble telling if objects are new or if they are updates. This force you to have to call the insert method instead of the save. Not a big deal if you can tell when a page is doing an insert and when it id doing an update.

Another issue was getting many-to-one mappings and one-to-many mappings to work. see loading was not a problem but again when trying to update and save I ran into all sorts of problems. The quick solution was to all those mappings out of the mapping file and load them in my DAO layer. Not a big deal but when you are using to having a tool handle all that code for you it is upsetting.

All in all I was able to make the tool work. Now that I know the tricks, I wont feel as much pain the next time I have to map a composite key system.

Monday, November 12, 2007

Las Vegas Shows

So when I was in Vegas I saw the shows Spamalot and Penn & Teller. I had really good seats for each show in fact we were within the first ten rows.

I saw Spamalot first. Spamalot was shown at the Wynn Casino. I like Monty Python and have seen their movies. Spamalot is basically an adaption of the movie Search for the Holy Grail. In fact they turned it into a musical and even added a little Vegas to it. In all it was very entertaining and still had everything you would expect from a Monty Python production and a Las Vegas show. The Lady of the Lake had a terrific voice.

I saw Penn & Teller a day after I saw Spamalot. Penn & Teller was playing at The Rio All Suite Hotel and Casino. I have enjoyed Penn & Teller shows on TV, but was disappointed by the stage show. My disappointment comes from the fact that the show was exactly the same as their TV shows. Sure they might have had one or two differences, but they were not that entertaining.

To wrap up this post I would give Spamalot an A and Penn & Teller a B-. If you have never seen Search for the Holy Grail, or Penn & Teller on TV then you might enjoy both show even more.

Sunday, November 04, 2007

Las Vegas and other Stuff

I love Las Vegas. This town is ever changing and always getting better. I just wish I could win some money.

Anyways, some thoughts while I am here.

It is amazing how the casinos are using technology. From the time you check in to the time you leave you see computers and gadgets helping make your stay better. From being able to check out from your room, to watching the cleaning service use hand held device for keeping inventory and schedules up to date.

Tonight I am going to see Spamalot at the Wynn Casino. I hope the show is good.

Ad for my sports teams, the Badger played three good quarters of football before they ran out of gas and lost to the number one team in the nation. The Packers won and it was another amazing game. Brett Favre threw a couple more touchdowns and finally has a win against all thirty-one teams in the NFL.

I am not sure if I will have time to post again fron here but if I do I will try to get some pictures posted.