2013-01-03 59 views
0

考慮的SQLAlchemy以下聲明用戶模式:SQLAlchemy的+ PostgreSQL的報價表名的用戶,用燒瓶登錄

class User(Base): 
    id = Column(Integer, primary_key=True) 
    username = Column(String(50), unique=True) 
    email = Column(String(1024), unique=True) 
    points = Column(Integer, default=0) 
    achievements = relationship('Achievement', 
    secondary=achievement_association_table, 
    backref='users') 
    reviews = relationship('Review', backref='author', lazy='dynamic') 
    moderated = Column(Boolean, default=True) 

當我做了SELECT * FROM user,我注意到,該查詢是不返回我的所有列,並且只顯示了我只能推測的「current_user」列是使用Flask-Login的結果。

使得查詢User.query.all()導致下面的SQL:

SELECT "user".created AS user_created, "user".modified AS user_modified, "user".id AS user_id, "user".username AS user_username, "user".email AS user_email, "user".points AS user_points, "user".moderated AS user_moderated 

誰能幫助我理解了爲什麼創建此表雙引號?我的其他(類似定義的)聲明性模型都沒有表現出這種行爲。

在此先感謝!

回答