z0mt3c/dash-marionettejs-docset-generator — pull request #2 by Kapeli (2013-10-07 06:40:48+00:00)
Title: Fix NULL row ids

Currently, the script generates a database with empty (NULL) "id" rows. Due to this, when Dash does something like COUNT(id), things fail. For example, you can try to expand the Marionette docset in the docset browser and see that there are no counts for the number of Classes and/or Functions shown.

This is because Sequelize does something like this:

Executing: INSERT INTO `searchIndex` (`id`,`name`,`type`,`path`) VALUES (NULL,'CompositeView','Class','marionette.compositeview.html');

My changes make Sequelize to do something like this:

Executing: INSERT INTO `searchIndex` (`name`,`type`,`path`,`id`) VALUES ('Wreqr','Class','wreqr.html',NULL);

Which still tries to insert `id` as NULL, but somehow fails and the auto-increment works.

I have no idea what's going on, but this works (or at least for me). If you'd like to investigate things and come up with a proper fix, feel free to close this pull request. If not, just merge and don't worry about it :+1:.

In other news, I'll be adding the Marionette docset to Dash in version 1.9.2. Is it ok if I mention you in the release notes? Something like: "Added Marionette.js docset, thanks to Timo Behrmann".