OpenInformix / IfxPy

Informix native Python driver for scalable enterprise and IoT solutions.
Other
46 stars 22 forks source link

Boolean object not properly retrieved #37

Open frederickney opened 4 years ago

frederickney commented 4 years ago

I figured out that boolean object are not retrieved while querying object in sqlalchemy

libraries in use: SQLAlchemy==1.3.13 IfxAlchemy==1.0.1 IfxPy==3.0.2


from sqlalchemy import Column, INTEGER, Boolean, DateTime, VARCHAR
from Database import Database

class Team(Database.get_model_by_name('uccx016') or Database.get_model_by_name('uccx017')):

    __tablename__ = 'team'
    __table_args__ = {"schema": "informix"}

    teamid = Column(INTEGER, primary_key=True, autoincrement=True, default=None, nullable=False)
    profileid = Column(INTEGER, nullable=False)
    teamname = Column(VARCHAR(50), nullable=False)
    active = Column(Boolean, nullable=False)
    dateinactive = Column(DateTime, nullable=False)

teams = Database.get_session_by_name('uccx016').query(Team).all()

This will retrieve all the content for the 'informix.team' table except for the boolean column that is always set to None even if the value is set to true or false within the table.