Use the gui, select the db column and change the type in the combo at the bottom. You need JDK 1.4 if you want Middlegen to remember what you did until the next time you run it. On JDK 1.3 You'll have to do this every time.
Aslak ----- Original Message ----- From: "David Nouls" <[EMAIL PROTECTED]> Date: Friday, August 9, 2002 10:38 am Subject: [Middlegen-user] Optional fields and ints > Hello, > > I am using the latest CVS version of Middlegen to generate > EntityBeans with > CMP using a MySQL database. > > I have tables where there are integer fields that are optional. > Middlegen generates getters and setters for these fields using int > insteadof Integer! > So in fact I can not set those fields to null. Using a dummy id (- > 1) instead > does not > work because the database checks relations and throws an exception > if I set > the value to an > unexisting id. > > How can I force middlegen to use Integer instead of int ? > > /)avid > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > middlegen-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/middlegen-user > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user
