Hi all,
I am designing an application using MaxDB and Hibernate.
Persistence has never been my strength so I am struggling to make a decent and maintainable system design.
My question might be rather simple to some of you. My schema has a table with several String columns, each with size 255. In my application, I must ensure objects are not created having the matching property with length greater than this max size. For example, for setter name of class Person, an IllegalArgumentException is throw is the give name has over 255 chars.
In a scenario with many tables, each having their own size constraints, I foresee a maintainance nightmare to keep the java code synchronized with the database schema, should I decide to alter the columns size.
I tried using Text columns but MaxDB has limitations on such type in the sense that I cannot query their values.
Could someone provide me some hint on what would be a better approach, and if Hibernate could somehow help me keeping this concern isolated from my application code?
Thanks!
|