If I have something like this:

class MyThing(Entity):
     name = Field(Text)
     # Umpteen more fields

And I have a record like this where the fields are populated and it has been 
saved in the database:

full = MyThing(name="Foo", blah, blah)

If I want to "empty" that record to convert it to look like:

empty = MyThing()

Where no fields are populated, can I just do something simplistic like this?

empty.id = full.id
empty.flush()

Or is there some more elegant way to empty a record?

Michael



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to