RE: NPE in DataDomainQueryAction.java

2007-08-02 Thread Kevin Menard
> -Original Message- > From: Andrus Adamchik [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 02, 2007 6:21 PM > To: dev@cayenne.apache.org > Subject: Re: NPE in DataDomainQueryAction.java > > > Anyway, if you have any idea what's going on, great. If not, I'll > dig > > in more. I just

Re: NPE in DataDomainQueryAction.java

2007-08-02 Thread Andrus Adamchik
Anyway, if you have any idea what's going on, great. If not, I'll dig in more. I just wanted to check before wasting effort. Nothing immediately obvious, but then it is past 1 am in my timezone :-) Andrus On Aug 3, 2007, at 1:15 AM, Kevin Menard wrote: Andrus, Happen to have any idea wha

NPE in DataDomainQueryAction.java

2007-08-02 Thread Kevin Menard
Andrus, Happen to have any idea what would cause an NPE at: org.apache.cayenne.access.DataDomainQueryAction.interceptOIDQuery(DataDo mainQueryAction.java:175) Stepping through it a bit, I've observed that the DataDomainQueryAction cache is null, but the ObjectIdQuery cache policy is set to CACHE

[JIRA] Created: (CAY-839) Support combination of Persistent objects and scalars in query results

2007-08-02 Thread Andrus Adamchik (JIRA)
Support combination of Persistent objects and scalars in query results -- Key: CAY-839 URL: https://issues.apache.org/cayenne/browse/CAY-839 Project: Cayenne Issue Type: Imp

Re: PostgreSQL sequences revisited

2007-08-02 Thread Andrus Adamchik
Yeah, I've seen that attitude on PG JDBC list before (" it's easy to get items added to the todo list.."). I can sympathize to an extent, as I am often reluctant to add things to Cayenne that don't feel right from where I am. Still this doesn't help that in this case such thing is a sta

RE: PostgreSQL sequences revisited

2007-08-02 Thread Kevin Menard
> -Original Message- > From: Andrus Adamchik [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 02, 2007 8:20 AM > To: dev@cayenne.apache.org > Subject: Re: PostgreSQL sequences revisited > > A question - would serial type work as an auto-increment? I.e. is it > possible to run PreparedSta

Re: [JIRA] Commented: (CAY-811) Meaningful identity columns: user provided PK values are ignored

2007-08-02 Thread Andrus Adamchik
Finally had a chance to look at the code (instead of suggesting random things :-)). I think a patch like that would work (in fact I tested it with POJO itests and it seems to do the right thing. If there are no objections I can commit it tomorrow. Andrus Index: framework/cayenne-jdk1.4-un

Re: [JIRA] Commented: (CAY-811) Meaningful identity columns: user provided PK values are ignored

2007-08-02 Thread Andrus Adamchik
I see... The problem is that 'isGenerated' only applies to 'Db Generated' PK strategy and does not apply to 'Default'. So maybe leave the zero rule for primitives, and check the ObjAttribute (don't know if it is easily available in that place without looking at the code?) for whether the va

Re: [JIRA] Commented: (CAY-811) Meaningful identity columns: user provided PK values are ignored

2007-08-02 Thread Tore Halset
On Aug 2, 2007, at 14:59 , Andrus Adamchik wrote: On Aug 2, 2007, at 3:52 PM, Tore Halset wrote: On Aug 2, 2007, at 14:43 , Tore Halset wrote: Handling null as 0 can probably lead to other problems as well. Perhaps 'NullNumber extends Number' could be used? Or creating a (empty) Null-inte

Re: newbie maven junit question

2007-08-02 Thread [EMAIL PROTECTED]
> Ah cool. So it places it under "target/site/surefire-report.html"... > Still turned out to be not very usable. The report for cayenne-jdk1.4- > unpublished module is 32 MB!! My FireFox is choking. Wonder if it is > possible to split it into more manageable files, like Ant did? I guess you can't

Re: newbie maven junit question

2007-08-02 Thread Andrus Adamchik
Ah cool. So it places it under "target/site/surefire-report.html"... Still turned out to be not very usable. The report for cayenne-jdk1.4- unpublished module is 32 MB!! My FireFox is choking. Wonder if it is possible to split it into more manageable files, like Ant did? Andrus On Aug 2,

Re: newbie maven junit question

2007-08-02 Thread [EMAIL PROTECTED]
> > On Aug 2, 2007, at 3:48 PM, Tore Halset wrote: > There's no single easy to browse report (if somebody knows how to > create it, please let us know). http://maven.apache.org/plugins/maven-surefire-report-plugin/usage.html Antonio -- Leggi

RE: PostgreSQL sequences revisited

2007-08-02 Thread Kevin Menard
I'll have to give it a try. The serial type sets up the default value for the field, which basically calls nextval() on the sequence. I don't know if the JDBC driver deals with that or not, though. If it does, we could do it with the existing PK generator and not bother with serial. Serial is mo

Re: [JIRA] Commented: (CAY-811) Meaningful identity columns: user provided PK values are ignored

2007-08-02 Thread Andrus Adamchik
On Aug 2, 2007, at 3:52 PM, Tore Halset wrote: On Aug 2, 2007, at 14:43 , Tore Halset wrote: Handling null as 0 can probably lead to other problems as well. Perhaps 'NullNumber extends Number' could be used? Or creating a (empty) Null-interface and then subclass Integer, Long and so on?

Re: newbie maven junit question

2007-08-02 Thread Andrus Adamchik
On Aug 2, 2007, at 3:48 PM, Tore Halset wrote: Hello. (sorry for this embarrassing newbie question) I am reading http://cayenne.apache.org/running-unit-tests.html and it confirms what I know, namely that running "mvn install" runs all the junit tests. But, where do I find/get/create those

Re: [JIRA] Commented: (CAY-811) Meaningful identity columns: user provided PK values are ignored

2007-08-02 Thread Tore Halset
On Aug 2, 2007, at 14:43 , Tore Halset wrote: Handling null as 0 can probably lead to other problems as well. Perhaps 'NullNumber extends Number' could be used? Or creating a (empty) Null-interface and then subclass Integer, Long and so on? The last one would not work as Integer is final.

Re: [JIRA] Commented: (CAY-811) Meaningful identity columns: user provided PK values are ignored

2007-08-02 Thread Andrus Adamchik
On Aug 2, 2007, at 3:43 PM, Tore Halset wrote: Handling null as 0 can probably lead to other problems as well. I guess that would be "handling zero as null". As far as I am aware this is the only place where we stretched that a bit. I need some more time to look at the code - maybe we can

Re: PostgreSQL sequences revisited

2007-08-02 Thread Michael Gentry
Again, no JDBC info here, but ... I did (this is all done in PgAdmin): create table mytable ( name varchar(60), pk serial primary key ) and this was reported: NOTICE: CREATE TABLE will create implicit sequence "mytable_pk_seq" for serial column "mytable.pk" NOTICE: CREATE TABLE / PRIMARY KEY

newbie maven junit question

2007-08-02 Thread Tore Halset
Hello. (sorry for this embarrassing newbie question) I am reading http://cayenne.apache.org/running-unit-tests.html and it confirms what I know, namely that running "mvn install" runs all the junit tests. But, where do I find/get/create those pretty html reports? I have tried with "mvn sur

Re: [JIRA] Commented: (CAY-811) Meaningful identity columns: user provided PK values are ignored

2007-08-02 Thread Tore Halset
On Aug 2, 2007, at 13:58 , Andrus Adamchik wrote: let me take this to the list, as it would be much easier to follow the discussion compared to Jira comments. First, this is indeed a separate issue from CAY-811 main problem, as it has nothing to do with database generated PK. Okay, I reop

Re: PostgreSQL sequences revisited

2007-08-02 Thread Michael Gentry
This doesn't really cover the JDBC driver, but tells a little more about the serial type: http://www.postgresql.org/docs/8.1/static/datatype.html#DATATYPE-SERIAL It looks like declaring something to be serial sets up a sequence, too? I'm always wary of the word "equivalent" in tech docs, though.

Re: PostgreSQL sequences revisited

2007-08-02 Thread Andrus Adamchik
A question - would serial type work as an auto-increment? I.e. is it possible to run PreparedStatement like this (notice no PK in the statement): INSERT INTO ARTIST (NAME) VALUES (?) And then get back DB-generated ARTIST_ID via java.sql.Statement.getGeneratedKeys()? I suspect no, but if

Re: [JIRA] Commented: (CAY-811) Meaningful identity columns: user provided PK values are ignored

2007-08-02 Thread Andrus Adamchik
Tore, let me take this to the list, as it would be much easier to follow the discussion compared to Jira comments. First, this is indeed a separate issue from CAY-811 main problem, as it has nothing to do with database generated PK. Now that you posted a patch below I remember why it was

PostgreSQL sequences revisited

2007-08-02 Thread Kevin Menard
I'd like to solicit feedback on PostgreSQL sequences, especially from Tore. When I added the code to generate PKs from sequences, I think I did so rather naively. I assumed sequences were sequences and essentially lifted the code from the Oracle PK generator. This was simple and easy to digest b