| 66 | Base = declarative_base() |
| 67 | |
| 68 | class J(Base): |
| 69 | __tablename__ = "j" |
| 70 | id = Column("id", Integer, primary_key=True) |
| 71 | json = Column("_json", JSON, default={}) |
| 72 | field = index_property("json", "field") |
| 73 | |
| 74 | j = J(json={"a": 1, "b": 2}) |
| 75 | assert_raises(AttributeError, lambda: j.field) |