Mailing List Archive

regarding zope database
hi all..

How to communicate with zope database? the documents that we post in Plone
have id, ya? it is store in data.fs. how to extract those ids with query?
Plz help on this regard.

many thankx,
bs
Re: regarding zope database [ In reply to ]
<-bhavana -> wrote:
> hi all..
>
> How to communicate with zope database? the documents that we post in
> Plone have id, ya? it is store in data.fs. how to extract those ids with
> query? Plz help on this regard.

Hi bs:

Read the chapter 17, Searching and Categorizing CContent in the Zope book.

http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/SearchingZCatalog.stx

HTH,

Suresh


_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: regarding zope database [ In reply to ]
"<-bhavana ->" <hi.bhavana@gmail.com> wrote at 2006-1-30 10:27 +0700:
> ...
>How to communicate with zope database?

You use Zope (or scripts using the Zope codebase).

>the documents that we post in Plone
>have id, ya?

There are lots of "id"s around.

The "id" used in Plone is not a universal id, but unique only
locally in the container. Therefore, you cannot use it
to identify and fetch an object.

Modern Plone versions (2.1.x) have documents based on
AT. There have a universal unique id which can be resolved
via the "uid_catalog" into the object.
Someone else already recommended to read the "catalog" section
of the Zope Book (online 2.7 edition). Follow this advice!

All persitent objects already have a "persitent id".
It is not used at application level (as it is meaningless there).
The persistent id is the id used by the Zope database.
When you know the peristent id of an object, you can
load it from ZODB *BUT* it will behave very differently
from how you are acoustomed to. That's because you are
*NOT* working with raw objects in Zope/Plone but with
acquisition wrappers. A ZODB load gives you instead
the raw object, which, among other, does not have
a location, nor an URL nor a parent....

--
Dieter
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db