-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 16 January 2003 09:54 pm, Luke Holden wrote:
> And it still happens.. It looks like ObjectStore knows when it has changes
> pending... And actually writes the changes out to the database... but it is
> not changing its in memory copy of the data to reflect those changes.

Okay... Say I have the following setup.

Object1 contains a list of Object2's

Object2 has a reference to Object1 and Object3

Object3 does not have a list of anything. (Although it could... you might be 
curious to know all the Object2s which reference an Object3 object.

Now...Object2 is a mapping between Object1s and Object3s



According to the Docs.... you could create new Object2s in two ways:

myObject2 = Object2()
myObject2.setObject1(myObject1)
myObject2.setObject3(myObject3)
store.addObject(myObject2)
store.saveChanges()

And delete that object by:
store.deleteObject(myObject2)
store.saveChanges()

Now... the problem with this is that, myObject1's in memory list of Object2's 
does not get updated.

This can be solved by instead, doing:
myObject2 = Object2()
myObject2.setObject3(myObject3)
myObject1.addToObject2s(myObject2)
store.saveChanges()


However... I do not see a way to do the same thing for delete.
I may be wrong, but in order for myObject1 to get its in-memory list of 
Object2s updated... you would have to add a function like .addToObject2s but 
for deleting Object2's to the Object1.py file.


Anyways... shouldn't store.addObject() and store.deleteObject() detect if 
myObject2 has not been added/deleted from myObject1's list... and make the 
required changes?

If not, how come there is not a version of addObject2s for removing objects?
- -- 
Luke Holden
eBI Solutions
Main: (949) 387-5182
Email: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+KH7/3q5xXfLZTQkRAoC6AJ9ijnCJWlUxvFBRUbkXcfdHapNLYACffNsf
0ZJfnKhrTeB73Ny33GImfOM=
=8bdH
-----END PGP SIGNATURE-----



-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your 
clients even if they use browsers that are limited to 40 bit encryption. 
Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to