Hi, On 09/06/16 23:39, Alistair Grant wrote: [...]
I've been able to define a couple of classes / tables with foreign keys and it is all working fine. I'm still to set up a many-to-many relationship and the more complex queries, but it is all looking good so far.
I have seen one other problem with UDBC-SQLite3: if a connection is open when the image is saved, it must be manually closed and re-opened after the image is opened. Should this be handled automatically? If you think this should be working I'll put together some code to reproduce it.
[...] I experienced something similar with NBSQLite3 before. Now I'm always closing my connections explicitly, once I have the collected info of the query in a "report" object of Pharo. I don't know if this could work in your case. In mine, the Panama Papers project has this, for example: =============== OffshoresDB class>>totalOffshoresByCountryRaw "I query for the offshores by country data from a SQLite database file" | queryResults query | query := 'SELECT countries AS "country_name", count(countries) AS "total_offshores" FROM Addresses GROUP BY countries'. self dataLocation exists ifFalse: [ self inform: 'Download database first by running: ', String cr, '"OffshoreLeaks updateDatabase"' ] ifTrue: [ queryResults := (self database open execute: query) rows collect: [ :each | each data ]. self database isOpen ifTrue: [ self database close ]. ^ queryResults ] =============== Cheers, Offray