On Mar 4, 2007, at 9:58 PM, rgravina wrote:

>
> I was wondering if it is possible to specify a primary key manually?

sure, just set whatever column-based attributes you like before  
flushing...such as if your table's primary key column is named  
"some_id", you could say:

myobject.some_id = 7
session.flush()


> The reason I want to do this is I have a Twisted client/server program
> where the clients have some of the data from the server. I'd like the
> clients to be able to have their own sqlalchemy database with objects
> and relationships which have the same primary keys as on the server.
> That way, when one user updates an object, I can nofity all clients
> that some object has been updated.
>
> Also, Is there a better way to go about this? Essentially, what I'm
> after is a distributed object database, but I can settle with my
> implementation as above. Could this be implemented with SQLAlchmey/
> Twisted?

well youre saying youve already done it, right ? :)  I did get to  
speak to Glyph at Pycon a little bit but I dont think hes sold on SA  
quite yet.  But at least several people have various combinations of  
Twisted/SA running.   I havent ventured into trying to invent  
strategies for database replication and distribution since theyre  
bound to be incomplete solutions, which id then get stuck with people  
complaining that it doesnt work.  Replication and distribution would  
best be implemented by the RDBMS itself.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to