You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way we can explicitly list all the fields we want filters created for? Like maybe in the Meta of the sqlalchemy object type?
The text was updated successfully, but these errors were encountered:
adiberk
changed the title
How to exclude fields from having filters auto created
How to exclude or specifically include fields from having filters auto created
Dec 27, 2024
@adiberk@andmaster-one if you look in the docstring for ORMField you'll see a param for enabling/disabling filter creation. Modifying an example usage from the same docstring:
classMyModel(Base):
id=Column(Integer(), primary_key=True)
name=Column(String)
classMyType(SQLAlchemyObjectType):
classMeta:
model=MyModelid=ORMField(create_filter=False) # disable filtering for this fieldname=ORMField(create_filter=True) # True is default behavior, but we can make it explicit
You can also change the default behavior using the create_filterparam on the Meta class
Is there a way we can explicitly list all the fields we want filters created for? Like maybe in the Meta of the sqlalchemy object type?
The text was updated successfully, but these errors were encountered: