Hi Marijn,
I think an option to not try to save unbound slots would solve my problem perfectly. In the mean time I'll use your :initform query suggestion. We have a very 'involved' DBA on this project and I'm not sure that this double-querying will be acceptable to her in the long run, but it'll certainly be fine for the development DB. So, no great urgency.
Thanks very much!
- Peter
On Feb 10, 2008 2:04 PM, Marijn Haverbeke marijnh@gmail.com wrote:
particularly elegant way. In some cases, you can just give the fields an :initform like (query (:select (:nextval 'my-sequence))). This has the disadvantage of generating extra queries whenever you create a dao object. If you think it would be useful, I can add some exception to the save-dao code to make sure it does not try to save slots that are unbound -- that way you could just not initialise the fields that have default values, and wait until insert time for them to get a value. Of course, if you need access to these values before saving the record, this will not help.