On 26/07/12 12:16am, Joel Becker wrote:
Hello,

I am using performIteratedQuery(new SelectQuery(clazz)) and
objectFromDataRow(). I make changes to each object, but commitChanges() is
not committing the changes :( . I can see the queries logged:

2012-07-25 09:12:58,835 [main] INFO  org.apache.cayenne.access.QueryLogger
  - --- will run 1 query.
2012-07-25 09:12:58,835 [main] INFO  org.apache.cayenne.access.QueryLogger
  - UPDATE xprecinct_part SET reporting_unit_id = ? WHERE vr_id = ?
2012-07-25 09:12:58,835 [main] INFO  org.apache.cayenne.access.QueryLogger
  - [bind: 1->reporting_unit_id:72, 2->vr_id:'20815']
2012-07-25 09:12:58,835 [main] INFO  org.apache.cayenne.access.QueryLogger
  - === updated 1 row.

But when I open the SQLite database file I'm committing to, the changes
have not taken effect. Any ideas why?


Interestingly we've just been talking about SQlite. Support for this database 
is patchy at best and it doesn't pass all the unit tests in Cayenne, because 
SQlite doesn't support the full SQL specification. But the simple UPDATE you 
have above should work.

Since your database is not throwing errors, is it silently swallowing them? Do 
you have write permissions? Is the database in a read/write location. Can you 
execute these queries by hand with the same user/pass?

If you need a simple lightweight database which just works without fuss, can I 
suggest Derby?

Ari


--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Reply via email to