From: David L. <dle...@co...> - 2010-08-24 16:32:49
|
On 2010-08-24, at 12:29 PM, Ramsey Gurley wrote: > > On Aug 24, 2010, at 11:50 AM, Pascal Robert wrote: > >> >> Le 2010-08-24 à 11:41, David LeBer a écrit : >> >>> Boy you guys have been busy ;-) >>> >>> ERModernMoviesDemo used to run out of the box. This was enabled by >>> a couple of things: >>> >>> 1. The fully populated H2 database was in the Resources folder of >>> ERMoviesLogic >>> 2. The connection dictionary was set in the model (also in the >>> Resources folder of ERMoviesLogic). >>> >>> Because the two were relative to one another, the file url for H2 >>> worked fine. >>> >>> Mike (I think) added full migration support and removed the >>> connection dictionary from the model, and then Pascal added >>> ERAttachment and ERTaggable frameworks. >> >> It's all my doing, this is me who added migration support, I took >> the blame. > > Migrations are good. But I have noticed during the process of working > on my WOWODC presentations that the H2 database appears to sometimes > have relationships that point to nowhere. > >> >>> This broke the relative relationship between the model and the >>> embedded db, and with the additional models, made it impossible to >>> restore it. >>> >>> If you set the H2 url in the properties file, it treats it as a >>> relative to the current working directory (usually the build >>> location of the .woa) or as absolute to the root of the drive. >>> >>> To regain the 'run out of the box' behaviour, I'd like to set the >>> following properties as defaults in ERModerMoviesDemo: >>> >>> # H2 Connection Dictionary >>> >>> # Puts the Movies H2 Database at the root of the user home >>> # Disable or change the path as appropriate >>> dbConnectURLGLOBAL=jdbc:h2:file:~/ERModernMoviesDB/Movies >>> >>> # Migrations >>> er.migration.migrateAtStartup=true >>> er.migration.createTablesIfNecessary=true >>> >>> What say you all? >>> >>> ;david > > > Will ~ work if someone decides to add unit tests run by Hudson or > somesuch? Is that a realistic concern for a demo app like this? And I would assume that ~ should resolve to the home directory of whatever process was running Hudson. ;david -- David LeBer Codeferous Software 'co-def-er-ous' adj. Literally 'code-bearing' site: http://codeferous.com blog: http://davidleber.net profile: http://www.linkedin.com/in/davidleber twitter: http://twitter.com/rebeld -- Toronto Area Cocoa / WebObjects developers group: http://tacow.org |