in

 

Sean Chambers

I am a Lead Developer from Palm Coast Florida. If I could describe my skillset I would include TDD, DDD, Alt.net, NHibernate, Castle Project and so on

April 2008 - Posts

  • Mapping a collection of Enums with NHibernate

    Just came across a situation where I needed to have a collection of enum values mapped to an IList and to have it supported by NHibernate. It took me a little bit to find the proper approach and get NHibernate to play nicely. So as a reference for anyone else running into this you can find some information at this posting here

    Here is a snippet of the bag at hand:

    <bag name="companyRoleList" access="field" lazy="false" cascade="none" table="CompanyRole" >
        <key column="CompanyID" />
        <element column="RoleID" type="MyCompany.Domain.Lookups.CompanyRoleType, MyCompany.Domain.Lookups" />
    </bag>

    This is from the blog post on the NHibernate forum. The trick here is to have the full namespace/assembly qualification in the type attribute that points to the Enum you are using as a collection. This is needed even if you have the namespace=, assembly= at the hibernate-mapping element. That stumped for a little while.

    Hopefully this helps someone else out!

  • I must admit

    Even though I haven't been blogging alot recently on LosTechies, doesn't mean I haven't been blogging. Even though Bil Simser, Sergio Pereira and Kyle Baley have all claimed to be ALT.NET Pursefight, they are indeed NOT!

    I am the true ALT.NET Pursefight!!!! Accept no substitute and believe noone else!

    Who else could it be? I am witty, intelligent and cool all wrapped up into one. This clearly makes me the ALT.NET Pursefight blogger. I am one of the "nobody developers" that would clearly end up being the ALT.NET Pursefight blogger. It's as clear as mud!

    At first I tried to chime in once or twice on the list only to get burned. This make me quite angry so rather then lash out I decided to don a cloak of anonymity and attack from behind the shadows. Genius eh? Before you ask I WILL NOT sign any autographs or kiss any babies.

    That being said, the list has become quite boring recently so I urge everyone to start bickering again. Give me more blogging material! PLEASE!!!

Copyright Los Techies 2007. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems