solved it by checking before inserting
use session.query().filter().count()
now everything runs ok .
many thanks
On Sunday, May 21, 2017 at 11:13:37 PM UTC+8, bb1898 wrote:
>
> Am 21.05.2017 um 13:45 schrieb R0R0N0A:
> > it's true that I insert the same record every time I
:03 PM UTC+8, bb1898 wrote:
>
> Am 21.05.2017 um 12:28 schrieb R0R0N0A:
> > I have a table and some keys inside it
> > have two unique key
> > when i first run the code it runs okay
> > but when I sencond time run it
> > it says a unique key constrains
&g
I have a table and some keys inside it
have two unique key
when i first run the code it runs okay
but when I sencond time run it
it says a unique key constrains
here's the matter that I need to loop the code to query some new updates
and insert to database
I dont know why except the first
and I did exactly the same
On Sunday, May 21, 2017 at 7:45:09 PM UTC+8, R0R0N0A wrote:
>
> it's true that I insert the same record every time I run the code
> But it's unique , right ? it shouldn't insert to the table right ?
>
> My purpose is loop the code and see if any new r