cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Martín Santos <gadita...@gmail.com>
Subject Re: Insert Meaningful Primary Key
Date Tue, 11 Sep 2012 12:33:41 GMT
Thank you very much Ari:

I can't do that you have told me:
city = context.newObject(City.class);
city.setcdCity(11);

In my code, I've not Classes because i'm using Generic Persistent Class
(http://cayenne.apache.org/doc30/generic-persistent-class.html).

Length 2 is because when I designed the DbEntity (table) with
cayenneModeler, I chose in the atribute CD_CITY the type NUMERIC and
MAXLENGTH 2. After when cayenne generated automatically the Database Schema
for an Oracle Database, this column is NUMBER(2,0).

I think that the generic persistent is a good idea because you musn't write
or generated the POJO for your classes, but I don't know if it's the best
way to use Cayenne....


Saludos!!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message