Re: FW: How to set null for a column for which the corresponding java type is long

2004-02-03 Thread ZZZ Liu
Thanks a lot for all of your answers. I just realized that OJB can convert from JDBC types to Number (Integer, Long, BigInteger,BigDecimal) automatically. For example, JDBC type BIGINT can be converted to either primitive long or Object Long without any FieldConversion. In this case, I can just

Re: How to set null for a column for which the corresponding java type is long

2004-01-28 Thread Danilo Tommasina
Hi, Do not use a primitive data type in your persistent class, use instead a subtype of Number. (Integer, Long, BigInteger, BigDecimal,... ) cheers Danilo Hi, All I have a data base column. The data type is number (10). It is nullable. The JDBC type defined in repository is BIGINT and the

Re: How to set null for a column for which the corresponding java type is long

2004-01-28 Thread Andrei Ivanov
But isn't that much slower? /me is a newbie in java and ojb On Wed, 28 Jan 2004, Danilo Tommasina wrote: Hi, Do not use a primitive data type in your persistent class, use instead a subtype of Number. (Integer, Long, BigInteger, BigDecimal,... ) cheers Danilo Hi, All I

Re: How to set null for a column for which the corresponding java type is long

2004-01-28 Thread Martin Kalén
Danilo Tommasina wrote: I have a data base column. The data type is number (10). It is nullable. The JDBC type defined in repository is BIGINT and the corresponding java type is long (default). Can anybody tell me how to save a record so that the value of that column is null instead of zero? Do

How to set null for a column for which the corresponding java type is long

2004-01-27 Thread ZZZ Liu
Hi, All I have a data base column. The data type is number (10). It is nullable. The JDBC type defined in repository is BIGINT and the corresponding java type is long (default). Can anybody tell me how to save a record so that the value of that column is null instead of zero? Thanks, Zhe