Re: Tutorial Mapping Query

2007-10-26 Thread Mikaël Cluseau
Le samedi 27 octobre 2007 à 09:40 +1000, Aristedes Maniatis a écrit : > At the moment, Cayenne 3 still supports JDK1.4 but the above code is > Java 5 specific. Didn't knew that, since 3.0 should implement JPA one day... so I though it was the first Cayenne to take advantage of Java 5, avoiding m

Re: Tutorial Mapping Query

2007-10-26 Thread Aristedes Maniatis
On 27/10/2007, at 8:53 AM, Mikaël Cluseau wrote: Its a lot of cut-and-paste, compared to the comment "we need to run the same query three times with different sets of parameters". Wouldn't the best code for this statement be : QueryChain chain = new QueryChain(); for (String tableName : n

Tutorial Mapping Query

2007-10-26 Thread Mikaël Cluseau
Hello there, I was going around 3.0M1, gone on the quick starts to see how it is ;-) I have been a bit disappointed by the "Main.java" code snippet : QueryChain chain = new QueryChain(); chain.addQuery(new NamedQuery("DeleteAll", Collections.singletonMap( "table",

Re: Persistent+ObjAttribute -> value

2007-10-26 Thread Andrus Adamchik
On Oct 26, 2007, at 3:11 PM, Tore Halset wrote: Hello. I am not so used to the Persistent interface. How can I get the value for a given ObjAttribute in a Persistent object? If the Persistent is a DataObject I could use readProperty. Regards, - Tore. Yes, there's no common superclass

Persistent+ObjAttribute -> value

2007-10-26 Thread Tore Halset
Hello. I am not so used to the Persistent interface. How can I get the value for a given ObjAttribute in a Persistent object? If the Persistent is a DataObject I could use readProperty. Regards, - Tore.