Re: How to create Meaningful Primary Keys?

2009-02-02 Thread Alessio Giovanni Baroni
alement, > Pierre Lavignotte > Ingénieur Conception & Développement > http://pierre.lavignotte.googlepages.com > > > On Mon, Feb 2, 2009 at 2:25 PM, Alessio Giovanni Baroni < > alessiogiovanni.bar...@gmail.com> wrote: > > > It's all ok. But, you are sur

Re: How to create Meaningful Primary Keys?

2009-02-02 Thread Alessio Giovanni Baroni
It's all ok. But, you are sure that in Entity screen, you are selected "Custom Sequence" on the "PK Generation Strategy"? If you do it, AND you add a filed relative to a pk column, you can handling the keys, without the cayenne's control. Hi. 2009/2/2 Νίκος Παράσχου > First of all thank you fo

Re: How to create Meaningful Primary Keys?

2009-02-02 Thread Alessio Giovanni Baroni
When you create the mapping table->object, you must to specify "PK Generation Strategy" as "Custom Sequence", and you have control complete on keys handling. Next, in the attributes of the table and the relative object, you must to add the field for the primary key, selecting the field PK also. Al

Re: Problems with Date in Cayenne 2.0.4

2009-01-29 Thread Alessio Giovanni Baroni
k >> >> java.sql.Timestamp extends java.util.Date, so it is ok. >>> >>> (and in any event doublecheck that the column in a table for the Bar >>> entity >>> is mapped as TIMESTAMP). >>> >>> Andrus >>> >>> >>>

Re: Problems with Date in Cayenne 2.0.4

2009-01-28 Thread Alessio Giovanni Baroni
."); Cayenne not save the TO_CHAR! Help? Thanks. 2009/1/28 Andrus Adamchik > java.sql.Timestamp extends java.util.Date, so it is ok. > > (and in any event doublecheck that the column in a table for the Bar entity > is mapped as TIMESTAMP). > > Andrus > > > On Jan 28,

Re: Problems with Date in Cayenne 2.0.4

2009-01-28 Thread Alessio Giovanni Baroni
> >>> http://cayenne.apache.org/doc20/scripting-sqltemplate.html >>> >>> Hope this helps, >>> >>> Andrus >>> >>> On Jan 28, 2009, at 4:48 PM, Alessio Giovanni Baroni wrote: >>> >>> Hi to all, >>>> I

Re: Problems with Date in Cayenne 2.0.4

2009-01-28 Thread Alessio Giovanni Baroni
t; > Hope this helps, > > Andrus > > > On Jan 28, 2009, at 4:48 PM, Alessio Giovanni Baroni wrote: > > Hi to all, >> I have the following code: >> >> . >> query = new SQLTemplate("SELECT FOO FROM BAR"); >> results

Problems with Date in Cayenne 2.0.4

2009-01-28 Thread Alessio Giovanni Baroni
Hi to all, I have the following code: . query = new SQLTemplate("SELECT FOO FROM BAR"); results = ctxt.performQuery(Bar.class, query); for(int i = 0; i < results.size() - 1; ++i) { Bar f = (Bar)results.get(i); .. (f.getFoo()); } In the