Hello everyone,

I turned on the debugging and I'm seeing queries like these :

INSERT INTO `language` (name) VALUES (%s) (u'ENGLISH',)
SELECT `language`.language_id FROM `language` WHERE 
`language`.language_id = 1 ()
INSERT INTO `language` (name) VALUES (%s) (u'FRENCH',)
SELECT `language`.language_id FROM `language` WHERE 
`language`.language_id = 2 ()

Why is a query made for `language`.language_id if we already have it 
(it's used in the WHERE statement)?

The code that generated this is :


class Language(Storm):
    __storm_table__ = "language"
   
    id = Int(primary=True, name="language_id")
    name = Unicode()
   
    def __init__(self, name):
        self.name = name

#
# Create the test languages
#
lang1 = Language(u"ENGLISH")
store.add(lang1)
lang2 = Language(u"FRENCH")
store.add(lang2)
store.flush()


Thank you,
Gabriel

-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to