[sqlalchemy] add new row into a many_to_one relationship database via ORM

2015-07-17 Thread Chengjun JIN
Hi all, I am trying to add new rows into an existing many to one database via sqlalchemy ORM. What I am doing now(it seems working): # The many to one relationship is: stock = relationship('Stock', backref=backref('historicalprices', order_by=id)) # query an object stock =

Re: [sqlalchemy] sqlalchemy.exc.DataError: (psycopg2.DataError) integer out of range

2015-07-14 Thread Chengjun JIN
to Numeric but it is not changed, due to my bad coding). Regards, Chengjun On Tuesday, July 14, 2015 at 1:47:08 AM UTC+2, Michael Bayer wrote: On 7/13/15 7:02 PM, Chengjun JIN wrote: Hi all, I am trying to save data into postgresql via sqlchemy ORM. I encountered an error below

[sqlalchemy] sqlalchemy.exc.DataError: (psycopg2.DataError) integer out of range

2015-07-13 Thread Chengjun JIN
Hi all, I am trying to save data into postgresql via sqlchemy ORM. I encountered an error below: sqlalchemy.exc.DataError: (psycopg2.DataError) integer out of range I pinpoint the place where it goes wrong. I have a large number which is 2468432255.0. If I change to smaller number like