Re: Creating Compound PKs

2007-06-03 Thread John Armstrong
Yes ID is a unique PK but I also want to enforce uniqueness across the NAME/SERVERID columns (A given Name can only be valid once per serverid). I can enforce it unique in the database but I was thinking that Cayenne may have a more elegant way of managing it without having to manually apply the

Re: Creating Compound PKs

2007-06-03 Thread Andrus Adamchik
Hmm... is this even a PK generation question? I understand that "id" is a unique PK already? Is there a need to define name/serverid as a part of PK as well? I mean you can (and Cayenne will support it), but what's the point. Maybe instead you can define a UNIQUE constraint on those two col

AW: performing count

2007-06-03 Thread Peter Schröder
+1 from me -Ursprüngliche Nachricht- Von: Michael Gentry [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 1. Juni 2007 17:44 An: user@cayenne.apache.org Betreff: Re: performing count Looking at that CountQuery class makes me think we should actually add it to Cayenne as a utility class. Pe

Re: Creating Compound PKs

2007-06-03 Thread John Armstrong
Yes, sorry misplaced that bit of important information. ImapServer account id password serverip Tx John- On 6/3/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote: Hi John, A question - is "serverid" a foreign key to another table by any chance? Andrus On Jun 4, 2007, at 9:09 AM, John Armstro

Re: Creating Compound PKs

2007-06-03 Thread Andrus Adamchik
Hi John, A question - is "serverid" a foreign key to another table by any chance? Andrus On Jun 4, 2007, at 9:09 AM, John Armstrong wrote: Does Cayenne allow for the creation of a compound PK? I searched the archives and google more generally and could only find hints at this. The docs did n

Creating Compound PKs

2007-06-03 Thread John Armstrong
Does Cayenne allow for the creation of a compound PK? I searched the archives and google more generally and could only find hints at this. The docs did not clarify either (although it was also hinted at. .I think, its a bit late :) ). My table looks like this: id name serverid status enabled I

Re: UTF8 problem

2007-06-03 Thread marco turchi
Dear Andrus, first of all, thanks a lot for your patience. I have created a new database using character set utf-8, and colletion utf8... Then i set the following variables: SET character_set_server = utf8; SET character_set_client = utf8; SET character_set_db = utf8; now the "status" command giv

Re: UTF8 problem

2007-06-03 Thread Andrus Adamchik
On Jun 2, 2007, at 9:43 PM, marco turchi wrote: | summary | longtext | utf8_general_ci | YES | | description | longtext | utf8_general_ci | YES | I believe the third column is "collation", not "encoding"; so encoding is still "latin". My idea is that the data are encod