[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: "Replacing" an attribute's value with "nothing"



Mudry, Robert (N-aerotek) wrote:
If you decide to use LDAP you have to stick to the standard to get some added value out of it. Otherwise go for something different.

I never said anything about "not sticking with" the standard. I am QUESTIONING the standard.

Then the OpenLDAP software list is the wrong forum. Go to http://www.openldap.org/lists/ietf-ldapbis/ instead.


A character string is empty if it is null.

But the string exists. And what that empty string means to your application depends on the application design/logic. If your application has requirements for a data model that the X.500 data model does not fulfill use another tool.


Frankly I can't see how checking for the existence of an attribute or properly check for null values differ in complexity of code.
[..]
So, if ( $value_a eq "") { # do delete } else { # do replace }.

Yes. So what?

Of course,
with delete I need to check if it succeeded or failed, and if it failed, was
it because the attribute ALREADY doesn't exist?

1. If your correctly implemented application properly guides the user he/she won't delete non-existing attributes.
2. If you have applications modifying your directory concurrently you have to have proper error handling in place anyway.


Is that really news to you?

Or should I just ignore the
error code, and hope the failure wasn't because of something evil like the
connection broke.

If that's the granularity you're thinking about error handling you should change job. LDAP defines error codes used by LDAP servers to distinct certain error situations. I do not see a problem with this.


THIS is my gripe. I think this is WRONG.

Personally I think your way of thinking about error handling is wrong. Well, nevermind.


No, I was implying that I thought the part of the standard that says you
can't have a null value for an attribute was as silly as having
"favouriteDrink" as part of the schema. In other words, was it REALLY
necessary to include favouriteDrink in the track schema?

You could ask the very same question for e.g. employeeNumber or mail in many deployment scenarios => what makes sense to you is simply up to you.


Ciao, Michael.