persistent service: default data
Raoul Pierre <[email protected]>
| Newsgroups | gmane.comp.java.keel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, with hsqldb (I didn't try with other RDBS), when some default data are specified, as /** * Payroll Worker * * @persist.persistent * schema="payroll" * name="worker" * descrip="Persistent worker" * table="worker" * * @persist.record * workerId="1" * lastname="This is the first record" * @persist.record * workerId="2" * lastname="This is the second record" */ then with the request model.do?model=createdb I get: - with the browser Unable to create database tables:Persistence exception while creating default data for 'payroll.worker', adding factory:default,name:payroll.worker,table_name:T_worker,field_values:workerId=1 - in Tomcat log Caused by: org.keel.services.persist.PersistenceException: $keelFieldNoAutoInc|Worker record IdUnable to allocate a block of Ids., Table not found: IDS in statement [SELECT next_id FROM ids] But if I remove the default data, then call the above request, there is no problem. And if after that, I keep the hsql files, put again the default data, rebuild the application and call the above request, then everything is fine: the records are created in the database. It seems that the IDS table isn't still created when Keel tries the first time to create the default data records. Pierre http://keelframework.org/documentation.shtml Keelgroup mailing list [email protected] http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com