Re: Stumps me.....Error "java.lang.String cannot be cast to java.util.UUID"

2012-07-20 Thread Kanwar Manish
Yes, this is a primary key column. If possible - please point me to an optimal way of initializing the column for new objects. On Fri, Jul 20, 2012 at 6:41 PM, Andrus Adamchik wrote: > > On Jul 20, 2012, at 2:31 PM, Kanwar Manish wrote: > > > Column is of type varchar(36) in PostgreSQL and it is

Re: Generated primary keys are being truncated

2012-07-20 Thread Andrus Adamchik
> The type in the PK column is NUMERIC with a size of 15 digits. This reflects > what is in the Oracle database. But since NUMERIC isn't BIGINT, the key is > being truncated to Integer. Is that expected behavior or have I found a bug? Sure it is NUMERIC in DB, but you can still map it in Cayenn

Re: Generated primary keys are being truncated

2012-07-20 Thread Joseph Senecal
The type in the PK column is NUMERIC with a size of 15 digits. This reflects what is in the Oracle database. But since NUMERIC isn't BIGINT, the key is being truncated to Integer. Is that expected behavior or have I found a bug? This is no longer an urgent issue. I was already overriding OracleP

Re: Generated primary keys are being truncated

2012-07-20 Thread Andrus Adamchik
> How do I specify a primary key type to be BIGINT? This is exactly what you need to do - in the Modeler change the PK column type of DbEntity to BIGINT from INT. Andrus On Jul 20, 2012, at 3:19 AM, Joseph Senecal wrote: > We're using Oracle and sequences, not an AUTO_PK table to generate

Re: Stumps me.....Error "java.lang.String cannot be cast to java.util.UUID"

2012-07-20 Thread Andrus Adamchik
On Jul 20, 2012, at 3:00 PM, Kanwar Manish wrote: > Just to add to this last statement of mine - why don't we have a type UUID > available in the Cayenne modeller as data column type - for DbEntity? Because DB types are based on JDBC spec, and it doesn't define UUID. Andrus

Re: Stumps me.....Error "java.lang.String cannot be cast to java.util.UUID"

2012-07-20 Thread Andrus Adamchik
On Jul 20, 2012, at 2:31 PM, Kanwar Manish wrote: > Column is of type varchar(36) in PostgreSQL and it is mapped as UUID in the > cayenne mapping. Is this a PK column? > In the constructor of the db class I am initiating the id. > Values are being saved perfectly fine. > > " > public class Use

Re: Stumps me.....Error "java.lang.String cannot be cast to java.util.UUID"

2012-07-20 Thread Kanwar Manish
Missing column type for DbEntity in Cayenne Modeller? Just to add to this last statement of mine - why don't we have a type UUID available in the Cayenne modeller as data column type - for DbEntity? On Fri, Jul 20, 2012 at 5:01 PM, Kanwar Manish wrote: > Sorry guys. Exception wasn't being rethro

Re: Stumps me.....Error "java.lang.String cannot be cast to java.util.UUID"

2012-07-20 Thread Kanwar Manish
Sorry guys. Exception wasn't being rethrown - so I thought it worked. Column is of type varchar(36) in PostgreSQL and it is mapped as UUID in the cayenne mapping. In the constructor of the db class I am initiating the id. Values are being saved perfectly fine. " public class UserMaster extends _U