suddenly, i noticed my tables look like this:

id      is_open     event_type_id       secondary_type_id       customer_id
18      1           2                   1                       1
59      1           1                   1                       1
57      1           4                   1                       2
58      1           1                   2                       1
61      1           1                   1                       1
62      1           1                   1                       1

how come id 59 comes before 57 and 58?
this is for the simple "SELECT * FROM
`events`" (dbsession.query(Event).all())

ofcourse i can use order_by id, but i was just wondering how it is
even possiable.
(i do not update/edit ids manually, and doing all the operations
through the dbsession)
this is my class

class Event(DeclarativeBase):
    __tablename__ = 'events'
    id = Column(Integer, primary_key=True)
    is_open = Column(Boolean, default=True)
    event_type_id = Column(Integer, ForeignKey('event_types.id'))
    secondary_type_id = Column(Integer)
    reports = relationship('Report', backref='event', cascade='all,
delete-orphan') # will delete reports if event is deleted
    customer_id = Column(Integer, ForeignKey('customers.id')) #  no
need to send it in the json cause it implicite who's the customer that
gets this event

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to