Closed tg-x closed 13 years ago
Hi! Thanks, I integrated the mysql patch. However, the id one I don't think is necessary. You can already set an id when instantiating a new object, like so:
var t = new Task(session, {id: 'blabla', ...});
That's what you're trying to do here right?
hm, just tested it again, seems like that's not needed anymore
I made that patch a while back for an earlier version, and if I recall correctly in the INSERT query the id appeared twice thus producing an error, but it works now.
That's possible. I made this change not too long ok. Alright then, thanks. I'll close this :-)
the mysql patch allows to add a callback for connect & listen on errors, so you could have something like: var db = persistenceStore.getSession(function(err) { // ... }); db.conn.on('error', function(err) { console.log('db conn error:', err); setTimeout(connect, 1000); });
the other patch allows for using a custom id instead of the auto-generated one: db.add(new Item({id: 'test', foo: 'bar'}));