Re: [Zope] ZODB access via ZEO

2007-02-08 Thread Dieter Maurer
Adit Ranadive wrote at 2007-2-7 14:10 -0500:
 ...
Im trying to read from the data.fs file plone product information like home
attributes.
Im doing this via ZEO using app.Control_Panel.Products.getObjectItems()
This returns to me a set of (object ids, objects). Using the object I change 
the
home attribute.
When I restart the script the home attribute is the same as it was before. So
the change did not take place in the database.
Is there any way to check back in the retrieved object from data.fs?

I see too possibilities:

  1. You forgot the import transaction; transaction.commit()
 to make your changes persistent

  2. The objects in Control_Panel.Products can be modified
 during startup for file systems based objects.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] ZODB access via ZEO

2007-02-07 Thread Adit Ranadive
Hello All,

Im trying to read from the data.fs file plone product information like home
attributes.
Im doing this via ZEO using app.Control_Panel.Products.getObjectItems()
This returns to me a set of (object ids, objects). Using the object I change the
home attribute.
When I restart the script the home attribute is the same as it was before. So
the change did not take place in the database.
Is there any way to check back in the retrieved object from data.fs?

Thanks,
Adit

PS: I want to be able to modify the home attrib so I can change location of
products even after theyre installed. AFAIK this is the only way to do it.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZODB access via ZEO

2007-02-07 Thread Jonathan


- Original Message - 
From: Adit Ranadive [EMAIL PROTECTED]

To: zope@zope.org
Sent: Wednesday, February 07, 2007 2:10 PM
Subject: [Zope] ZODB access via ZEO



Hello All,

Im trying to read from the data.fs file plone product information like 
home

attributes.
Im doing this via ZEO using app.Control_Panel.Products.getObjectItems()
This returns to me a set of (object ids, objects). Using the object I 
change the

home attribute.
When I restart the script the home attribute is the same as it was before. 
So

the change did not take place in the database.
Is there any way to check back in the retrieved object from data.fs?


I don't know anything about plone, but...

if you want to change a property of an item you can google for info on 
manage_changeProperties, however I would be very careful about changing 
things in the Products folder!!!


Do you want to change the product or an instance of a product/class?  In 
which case you need to be accessing the instance object not the Product 
object.


It makes no difference as to whether you are using zeo or not.


PS: I want to be able to modify the home attrib so I can change location 
of

products even after theyre installed. AFAIK this is the only way to do it.


As I said I know nothing about plone, but changing the location of products 
after they are installed sounds like a good way to cause yourself some 
serious pain. ;-)



Jonathan

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZODB access via ZEO

2007-02-07 Thread Adit Ranadive
Well, the home attribute cannot be changed using the manage_changeProperty
since it is not exactly a property of the object.
I tried that bt did not work..
Any way of putting an object back in ZODB?


As to causing the pain the script would be useful if users can take a copies of
the main dbs and use copies of their own products.



 - Original Message -
 From: Adit Ranadive [EMAIL PROTECTED]
 To: zope@zope.org
 Sent: Wednesday, February 07, 2007 2:10 PM
 Subject: [Zope] ZODB access via ZEO


  Hello All,
 
  Im trying to read from the data.fs file plone product information like
  home
  attributes.
  Im doing this via ZEO using app.Control_Panel.Products.getObjectItems()
  This returns to me a set of (object ids, objects). Using the object I
  change the
  home attribute.
  When I restart the script the home attribute is the same as it was before.
  So
  the change did not take place in the database.
  Is there any way to check back in the retrieved object from data.fs?

 I don't know anything about plone, but...

 if you want to change a property of an item you can google for info on
 manage_changeProperties, however I would be very careful about changing
 things in the Products folder!!!

 Do you want to change the product or an instance of a product/class?  In
 which case you need to be accessing the instance object not the Product
 object.

 It makes no difference as to whether you are using zeo or not.


  PS: I want to be able to modify the home attrib so I can change location
  of
  products even after theyre installed. AFAIK this is the only way to do it.

 As I said I know nothing about plone, but changing the location of products
 after they are installed sounds like a good way to cause yourself some
 serious pain. ;-)


 Jonathan




--

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZODB access via ZEO

2007-02-07 Thread Andreas Jung



--On 7. Februar 2007 14:39:34 -0500 Adit Ranadive 
[EMAIL PROTECTED] wrote:



Well, the home attribute cannot be changed using the manage_changeProperty
since it is not exactly a property of the object.
I tried that bt did not work..
Any way of putting an object back in ZODB?


As to causing the pain the script would be useful if users can take a
copies of the main dbs and use copies of their own products.


All you are writing does not make much sense. Please give a detailed 
description of your problem. I can't think of a problem that might require 
such an approach.


-aj

pgpJMrWHB2np3.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZODB access via ZEO

2007-02-07 Thread Maciej Wisniowski

 Well, the home attribute cannot be changed using the manage_changeProperty
 since it is not exactly a property of the object.
 I tried that bt did not work..
Isn't this possible to set this attribute with extenal method for
example?

 Any way of putting an object back in ZODB?
What do you mean by 'back in zodb'? back from where?

 As to causing the pain the script would be useful if users can take a copies 
 of
 the main dbs and use copies of their own products.
I have no idea what you're talking about. You say that you want to
copy data.fs between few zope intantces with different set of products?

Which class(?) has 'home' attribute? What do you mean by changing
location of products and what are products for you?

-- 
Maciej Wisniowski

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZODB access via ZEO

2007-02-07 Thread Jonathan


- Original Message - 
From: Adit Ranadive [EMAIL PROTECTED]

To: Jonathan [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Wednesday, February 07, 2007 2:39 PM
Subject: Re: [Zope] ZODB access via ZEO



Well, the home attribute cannot be changed using the manage_changeProperty
since it is not exactly a property of the object.
I tried that bt did not work..
Any way of putting an object back in ZODB?


This is really a plone question (regarding 'home attribute'), so you will 
probably get more help on the plone lists.




As to causing the pain the script would be useful if users can take a 
copies of

the main dbs and use copies of their own products.


I clearly don't understand your objective then.

By way of an example:  i have an application which, when a user registers: 
creates a folder, creates an instance of a ZCatalog in that folder, 
populates the ZCatalog with some indexes and metadata, creates mysql db 
entries for the user and then emails a password to the user.  The user gets 
their own folder, ZCatalog and mysql entries, but they are instances, not 
'products'.




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZODB access via ZEO

2007-02-07 Thread Adit Ranadive
The problem that I encountered is that once the Plone Products are installed in
data.fs and I move the same data.fs to another machine there is a constant
message upgrade product in the plone site setup window.
It occurs since the plone setup is unable to find the 'version.txt' file in the
products directory. The home attribute can be changed to fix this.

The problem seems to be of migration of data.fs and products to another machine.
I was hoping to get any info on accessing objects in ZODB

Thanks,
Adit



 - Original Message -
 From: Adit Ranadive [EMAIL PROTECTED]
 To: Jonathan [EMAIL PROTECTED]
 Cc: zope@zope.org
 Sent: Wednesday, February 07, 2007 2:39 PM
 Subject: Re: [Zope] ZODB access via ZEO


  Well, the home attribute cannot be changed using the manage_changeProperty
  since it is not exactly a property of the object.
  I tried that bt did not work..
  Any way of putting an object back in ZODB?

 This is really a plone question (regarding 'home attribute'), so you will
 probably get more help on the plone lists.



  As to causing the pain the script would be useful if users can take a
  copies of
  the main dbs and use copies of their own products.

 I clearly don't understand your objective then.

 By way of an example:  i have an application which, when a user registers:
 creates a folder, creates an instance of a ZCatalog in that folder,
 populates the ZCatalog with some indexes and metadata, creates mysql db
 entries for the user and then emails a password to the user.  The user gets
 their own folder, ZCatalog and mysql entries, but they are instances, not
 'products'.






--

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZODB access via ZEO

2007-02-07 Thread Jonathan


- Original Message - 
From: Adit Ranadive [EMAIL PROTECTED]

To: Jonathan [EMAIL PROTECTED]
Cc: zope@zope.org
Sent: Wednesday, February 07, 2007 3:12 PM
Subject: Re: [Zope] ZODB access via ZEO


The problem that I encountered is that once the Plone Products are 
installed in

data.fs and I move the same data.fs to another machine there is a constant
message upgrade product in the plone site setup window.
It occurs since the plone setup is unable to find the 'version.txt' file 
in the

products directory. The home attribute can be changed to fix this.

The problem seems to be of migration of data.fs and products to another 
machine.

I was hoping to get any info on accessing objects in ZODB


This is definitely a plone issue and you should ask on plone lists.


Jonathan 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )