What is your reason for needing the primary key as an int? Are you doing mathematical operations on it? The unique identifiers for the objects are based on the primary keys. And they are all of type ObjectKey. This allows torque to treat String, integer and date columns generically when used as a primary key. It is a good practice not to use primary keys with business meaning.
john mcnally Geoff Fortytwo wrote: > > When I mark a field as type="INTEGER" and then mark it as a primary key > using primaryKey="true" then the java data type that's used is NumberKey. > If I don't mark it as a primary key then the java data type is int. Why is > that? It just causes me more hassle because to get the value I have to do: > blah.getId().getBigDecimal().intValue() > instead of just doing > blah.getId() > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
