Skip to content

Add column_template kwarg to composite() for dataclass composite classes - #13579

Open
LeonardoRosaa wants to merge 1 commit into
sqlalchemy:mainfrom
LeonardoRosaa:composite-column-template
Open

Add column_template kwarg to composite() for dataclass composite classes#13579
LeonardoRosaa wants to merge 1 commit into
sqlalchemy:mainfrom
LeonardoRosaa:composite-column-template

Conversation

@LeonardoRosaa

Copy link
Copy Markdown

Fixes

Fixes: #12575

Description

Adds a column_template parameter to _orm.composite(). When the composite class is a dataclass, this parameter accepts a string template (e.g. "person_%s") with exactly one %s placeholder, used to generate column names for dataclass fields that don't otherwise have an explicit name.

@sqla-tester

Copy link
Copy Markdown
Collaborator

Hi, and thanks for the pull request!

This project accepts pull requests only for issues that a maintainer has already marked with the open for pull requests label. That way we can settle on an approach before anyone spends time writing code.

This pull request references issue #12575, which hasn't been marked open for pull requests, so the change isn't authorized yet and I'm closing it automatically. Once a maintainer adds the label to #12575, reopen this pull request and it will stay open. If #12575 needs more detail before that can happen, a complete runnable example is usually the missing piece, and adding one to the issue is the fastest way to get there.

This is automatic and procedural. It isn't a judgment on your change, and nothing you've written here is lost.

Thanks for your interest in the project!

@zzzeek

zzzeek commented Sep 10, 2026

Copy link
Copy Markdown
Member

It's fine

@zzzeek zzzeek reopened this Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prefixing Composite Column Types

3 participants