[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: OpenLDAP / PostgreSQL
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