• Post Reply Bookmark Topic Watch Topic
  • New Topic


Megan Mathew
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement where an entity can have both static and customizable part. The customizable part will be in the form of a Map within the entity. I used the CompositeUserType to handle this. The issue I am now facing is that it checks the number of columns configured in the entity with the number of columns available at run time, which in my case, will not match. This causes a wrong number of columns exception to be thrown.

If I use a Contact.hbm file

This will work, irrespective of what string is given as the column name for customProperties, as long as it is the correct number as the objects in the Map.

My issue is that, I know the number of columns only at runtime, and I need to use annotations instead of hbm files.

Please help.
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!