8000 Bug Report: func.now() Default with Update Count Check Causes Exception in StorageSession · Issue #1398 · google/adk-python · GitHub
[go: up one dir, main page]

Skip to content
Bug Report: func.now() Default with Update Count Check Causes Exception in StorageSession #1398
Open
@tshch1989

Description

@tshch1989

When using func.now() as a default value for datetime fields in StorageSession, rapid consecutive updates can lead to situations where the update count is 0. This triggers SQLAlchemy's update count verification, resulting in an unnecessary exception even though the operation was logically successful (the timestamp was already current).

Possible Solutions

update_time: Mapped[datetime] = mapped_column( DateTime(precision=6), server_default=func.now(), onupdate=func.now() )

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0