[storm] Lack of primary key and None

Grahame Bowland grahame at angrygoats.net
Tue Dec 9 13:36:24 GMT 2008


Hi all

I forgot to create the table backing a storm object with "PRIMARY KEY"
on the integer column "id". I'd marked that key as being primary in
the storm object definition. The result after creating a few of these
objects was a table full of rows with null IDs. This gives the strange
behaviour that storm returns None for every object returned from any
DB query; eg:
  store.find(MyObject)
is an iterator returning the number of rows worth of None.

Pretty confusing and hard to track down. I think it'd be better if
storm raised an exception in this case. I can send a patch in if this
is thought to be a good change?

Cheers
Grahame



More information about the storm mailing list