>
> On Wed, Sep 1, 2010 at 5:14 AM, Dobrysmak <lukasz.szyman...@gmail.com>wrote:
> [...]
>
> "ConcurrentModificationError: Updated rowcount 0 does not match number
> of objects updated 1"
>
> Mabey there's a better way to do this?
> Anyone have a clue?
>

Hi :)

you should have to many-to-many relationships and two association tables:
messages_users_receiving and messages_users_sending.

So you configure two many to many relationships with different secondary
tables.

Cheers,
Francisco Souza
Software developer at Giran and also full time
Open source evangelist at full time

English: http://www.franciscosouza.net
Portuguese: http://www.franciscosouza.com.br
Twitter: @franciscosouza
+55 27 3026 0264


On Wed, Sep 1, 2010 at 5:14 AM, Dobrysmak <lukasz.szyman...@gmail.com>wrote:

> Hi.
> I'm building a db with many-to-many relations, ex.
> * Table Users
> * Table Messages
> * Table Messages_Users
>
> when the users sends a message to other users i'm inserting that
> message to the db like so,
>
> *Messages <- insert 1 row with the message, values ( title, text ,
> date, etc... )
>
> *Messages_Users <- insert 2 rows ( one with connetion to the sending
> user and message,second with connection to the recieving user and
> message), values ( user_id, message_id, id_from, id_to, etc...)
>
> at the process of inserting the second row to the Messages_Users table
> i'm getting an error,
>
> "ConcurrentModificationError: Updated rowcount 0 does not match number
> of objects updated 1"
>
> Mabey there's a better way to do this?
> Anyone have a clue?
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to
> sqlalchemy+unsubscr...@googlegroups.com<sqlalchemy%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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