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 *first()* mean in this context?
http://docs.sqlalchemy.org/en/rel_0_9/orm/query.html?highlight=first#sqlalchemy.orm.query.Query.first > > > > > > for _candidate_data in candidates: > > > > _existing = session.query(CompassCandidate).filter(CompassCandidate.id > > == _ > > > > candidate_data.id).first() > > > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- Julien Cigar Belgian Biodiversity Platform (http://www.biodiversity.be) PGP fingerprint: EEF9 F697 4B68 D275 7B11 6A25 B2BB 3710 A204 23C0 No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
pgpqDZW6Ne1GU.pgp
Description: PGP signature