All pastes #104395 Raw Edit

Unnamed

public text v1 · immutable
#104395 ·published 2006-07-28 21:16 UTC
rendered paste body
#!/usr/bin/python

from sqlalchemy import *
from sqlalchemy.mods.threadlocal import assign_mapper

class Foo(object):
	class Bar(object):
		pass
	def __init__(self):
		metadata = BoundMetaData("sqlite://")
		table = Table('test', metadata,
			Column('test_id', Integer),
			Column('foo', Boolean))
		assign_mapper(self.Bar, table)

tmp = Foo()
#del tmp
tmp2 = Foo()