6 thoughts on “org.hibernate.MappingException: property mapping has wrong number of columns”

  1. I had the same problem in .NET NHibernate. We were using our custom framewrok which had Id as an object because we wanted to support int, long, guid keys in the future. The simple fix was to adjust our mappings to use

    And now it works just fine. In case we decide to move to guid keys, we just have to Find->Replace text in our mappings and won’t have to recompile our framework libraries.

Leave a Reply

Your email address will not be published. Required fields are marked *