oops meant to post this in the other thread (homework)
but thanks, I'll look into the idea of having the ID unset until object is written to db. Seems like a good idea and I don't see why it shouldn't work in my case
I'm using SQLite btw, and just asked my TA about this, he wasn't sure if SQLite supports this kind of automated key generation (apparently SQLite is built for speed
)
He suggested having the DB do it automatically, or if not possible, have a counter that reads the last line from the DB and assigns next possible id. I think that could cause the kind of problem RustyBrooks just mentioned though. Maybe I will have to change DB's if SQLite doesn't support this automation