- changed status to resolved
metadata pickling regression
Issue #2104
resolved
from sqlalchemy import *
import pickle
metadata = MetaData()
Table('a',metadata,
Column('id',Integer,primary_key=True),
Column('x', Integer, Sequence("x_seq"), ),
)
metadata2 = pickle.loads(pickle.dumps(metadata))
Table('a',metadata2,
Column('id',Integer,primary_key=True),
Column('x', Integer, Sequence("x_seq"), ),
useexisting=True)
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.7.0 (automated comment)
- Log in to comment
93da3087f1a068018a3c5a67f61dbbfa5178bdf0 , but some more thinking in de529fb81cc80cd49666a80ef60de6015ff81c1c . We change _sequences to be a dict which keys on the name/schema of the
Sequence
itself, and also support that theSequence
is present in _sequences from an unpickle regardless of if it was explicitly placed there. The lastSequence
associated with theTable
wins. The previous one is silently replaced, not unlike when Column is specified.