I'm not sure what you're trying to do, but if you put that code at hook threaddata_start then you're creating a Thread datamanager in the Thread datamanager constructor, which isn't good.
What are you doing, adding a field to the thread creation page, then trying to get the value to the database when the thread is created?