Re: Relationship caching

2008-04-15 Thread Laurent Marchal
It's a nice solution , i found another too that i missed in the documentation : RelationshipQuery is used by Cayenne internally to fetch object(s) related to a single given object via a mapped ObjRelationship. In some cases the query can be used directly in the application, e.g. if we want to

Re: Relationship caching

2008-04-15 Thread Mike Kienenberger
One way to guarantee it would be to change the code generation so that the getters perform an explicit query. You'll always be sure to get the latest database values, and you won't have to worry about invalidating anything. In Cayenne 1.2 code, it'd look something like this, although there's a bi

Relationship caching

2008-04-15 Thread Laurent Marchal
Hello, i have disabled caching in cayenne with : but when i want to use a flatened relationship like : List userAccessCodes = user.getRelatedAccessCodes(); the SQL request is only made the first time, after cayenne use his cache to return the AccessCode list. The only way i found to

Re: Many-to-many bug?

2008-04-15 Thread Alexis
Hi, I ran into the same issue, i guess. Here's a summary : A <-->>RelAB<<-->B I get all the RelAB for an A, remove all these objects, readd some new RelAB to this A and a B and then commit, all of this in a dedicated datacontext. In the logs, the inserts statements are generated as expected, the

RE: Stored proc returning result set (and output params) with MS SQL server

2008-04-15 Thread Marc Gabriel-Willem
Hello Andrus, The JDBC code used to call the stored procedure is really trivial. Please find below our test case. Connection connection = null; CallableStatement statement = null; try { connection = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433;databasename=mydb;", "guest