Hi,
I'm working on an existing database, generating the bindings and classes with Middlegen.
I'm working on customers and their orders. From a customer object, I call
getCustomerOrders() and get a Set of Orders. There are orders which have an int field set to NULL, which is the cause of my error message:
Code:
net.sf.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of mscustdb.hibernate.CustomerOrder.OrderCode
One possible solution would be to set this field to a special integer value (like 0 ) that we may be sure was not used as an order code. I'd prefer to not touch the data however.
Also I suspect I'll have more occurences of this problem, so I would like to find a better, general solution to put in my code.
Should I generate bindings and classes only with Integer types and no int? Is that possible?
Thanks in advance for your help!
Raph