Ok so I will give you some background so you can understand what I want to achieve.
I am working on a legacy system which has columns which are not-null and the default value is zero, these are foriegn key columns.
now, we can't add the "zero" columns on the tables because it will break be more than likely break legacy SQL statements, or atleast include false results.
alternately we can't make these columns nullable because we will also break certain legacy functions.
But I can't fully utilize JPA/Hibernate because without these "zero" columns (and there associated entities) when I create entities they are un-persistable (lookup is fine as long as i dont touch the zero columns), and not having these columns mapped defeats the point of using JPA/Hib as I may as well use straight SQL/JDBC
So what I want to know is, if there is a way to set these columns up as nullable in my entity, and when I try to persist them it will automatically fill them out with zero.
please ask questions so I can clarify, I am pretty stumped :\
|