[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[Fwd: Re: OpenLDAP / PostgreSQL]
This is not what I am asking.
>From your example and the filter, the person Mitya Kovalev passes
the filter. Therefore, the result for ldapsearch give
the following:
dn: cn=Mitya Kovalev,o=sql,c=RU
cn: Mitya Kovalev
sn: Mitya Kovalev
telephoneNumber: 332-2334
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
telephoneNumber: 222-3234
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
objectClass: person
>From this result, the telephone number 332-2334 is stilled
returned with the result. But this telephone number does not
match the search filter.
I want to have a search filter which selects
the qualified object class AND only the qualified
attributes.
In other words,I only want to display the phone number 222-3234.
The reason why I am asking for filtering attributes because
I want to reduce the data volume in an object.
Thank you.
Dantong
Gilles DAROLD wrote:
>
> Hi,
>
> Here is a sample, I have this entry in my LDAP PostgreSQL backend:
>
> dn: cn=Mitya Kovalev,o=sql,c=RU
> cn: Mitya Kovalev
> sn: Mitya Kovalev
> telephoneNumber: 332-2334
> telephoneNumber: 222-3234
> objectClass: person
>
> The person objectClass map a SQL table and the telephoneNumber attribute
> is set into an other SQL table.
>
> If I want to search person who have a phone number begining with 222 I
> do
> this search:
>
> ldapsearch -LLL -b "o=sql,c=RU" "(&(objectClass=person)
> (telephoneNumber=222*))"
>
> And if I want only those where 'sn' begin with "M" I do a search like
> that:
>
> ldapsearch -LLL -b "o=sql,c=RU" "(&(objectClass=person)
> (telephoneNumber=222*) (cn=M*))"
>
> I don't know if it reply to you question but if this doesn't work you
> certainly have
> a problem in your setting or object/attributes mapping.
>
> Regards
>
> Dantong Yu wrote:
> >
> > Hello,
> >
> > I want to publish my mysql database through openldap. I
> > am using back-mysql. I do not know whether your new patch
> > can solve my problem listed as follows:
> >
> > I found that the filter can be only applied to select the
> > qualified objects. If an object has a multiple value types,
> > this filter defined in ldapsearch can never be passed to
> > the attribute selection.
> >
> > For example, a person have four telephone numbers:
> > (Person is an object and the telephone numbers are
> > attributes) (In the relational database, there is a
> > table storing the person information
> > and there is another table storing the telephone number)
> >
> > Among these four numbers, two cell phone numbers and two
> > regular phone numbers, how can I list the person who has the
> > cell phone and his cell phone numbers?
> >
> > Thank you very much.
> > Dantong
>
> --
> -----------------------------------------------------------
> Gilles DAROLD (Service Informatique SAMSE)
> e-mail : mailto:gdarold@samse.fr
> Tel : 04.76.85.77.08 - Fax : 04.76.85.57.10