Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlaclhemy column of type sqlalchemy.dialects.postgresql.UUID throws exception #153

Open
berkio3x opened this issue Oct 12, 2020 · 0 comments

Comments

@berkio3x
Copy link

This is my sqlalchmey model, but it throws the below exception.

from sqlalchemy.dialects.postgresql import  UUID

class Test(Base):
    __tablename__ = "test"

    id = Column(
        UUID,
        server_default=sqlalchemy.text("uuid_generate_v4()"),
        primary_key=True,
        info={'form_field_class': TextField}, # <-- This should have been rendered as textfiled ?
    )

Form:

        class ObjectForm(ModelForm):
            class Meta:
                model = Test

exception:
wtforms_alchemy.exc.UnknownTypeException: Unknown type 'UUID()' for column 'organization_id'
This is a very common data type used while using postgres backend in sqlalchemy.

@berkio3x berkio3x changed the title sqlaclhemy fcolumn of type sqlalchemy.dialects.postgresql.UUID throws exception sqlaclhemy column of type sqlalchemy.dialects.postgresql.UUID throws exception Oct 12, 2020
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

No branches or pull requests

1 participant