Re: [sqlalchemy] relationship problem

2015-03-01 Thread Julien Cigar
On Fri, Feb 27, 2015 at 11:38:05PM -0500, Michael Bayer wrote: On Feb 26, 2015, at 5:56 AM, Julien Cigar jci...@ulb.ac.be wrote: On Wed, Feb 25, 2015 at 06:10:55PM -0500, Michael Bayer wrote: Julien Cigar jci...@ulb.ac.be wrote: On Thu, Feb 19, 2015 at 11:31:10AM -0500,

Re: [sqlalchemy] SQL Alchemy on Insert to DB

2015-03-01 Thread Julien Cigar
On Sun, Mar 01, 2015 at 10:57:31AM -0800, Javier Pajuelo wrote: Thanks. I followed the same principle, but had to change the set_attr to first check if the attribute was an instance of datetime, because my db accepted string of a datetime and not datetime. I have a question, what does

Re: [sqlalchemy] SQL Alchemy on Insert to DB

2015-03-01 Thread Javier Pajuelo
Now, that I have inspected the MySQL instance each time it runs through the scraper I noticed that jobs and candidates do not duplicate , but the event table duplicates. I am changing my updateevent method as you suggested, but I am having trouble dealing with foreign keys. Here's my update

Re: [sqlalchemy] SQL Alchemy on Insert to DB

2015-03-01 Thread Julien Cigar
On Sun, Mar 01, 2015 at 08:06:31AM -0800, Javier Pajuelo wrote: Thanks for the help, but in the code below it shows that setattr expects 3 arguments but got two instead. What is this code really doing? I know that my candidate fields are : name, id, link, timeStamp. Help. Thanks On

Re: [sqlalchemy] SQL Alchemy on Insert to DB

2015-03-01 Thread Javier Pajuelo
Thanks. I followed the same principle, but had to change the set_attr to first check if the attribute was an instance of datetime, because my db accepted string of a datetime and not datetime. I have a question, what does *first()* mean in this context? for _candidate_data in candidates: