modify with an attributes hash instead of an operations array?
I'd like to be able to use modify exactly the same as I use add. With add obviously you're sending a hash of all attributes an entity gets. The best I can figure, right now if I want to set a user's drink for example, I have to first query the server to see if they have a drink attribute defined already so I know to use :add or :replace.
If I have a bunch of stuff that may or may not have changed on my app or on the server, there's a lot of work I need to do.
What if modify optionally accepted attributes instead of operations and did all that work for me. The workflow I'm imagining is it searches for the :dn you passed in and assuming it matches, it pulls the current attributes, compares them to what attributes I passed in, and figures out what operations it needs to queue up to make that happen.
Essentially the end result would be the same as deleting the entity and adding it back immediately, but without it ever being gone, which can have consequences. Yes, anything added to the LDAP server outside of my app would get lost, but that's what I would expect passing a whole new attributes hash to do.
As an aside, in the current code if you do call modify with a :dn and an :attributes hash and no :operations array it doesn't fail and get_operation_result does not have an error to tell me I did something wrong.