Make handles immutable

- incoming handle IDs are always ignored in insert_handle, since it
should be a new handle
- to update a handle, the user must provide the same id, type, url, and
hid, and they must match the DB record (this might need rethinking,
another option is to just ignore those fields and only require the hid)
- the id, type, url and hid cannot be altered on a persist_handle call
- throw an error if the persist operation fails due to non-matching
record
- made some changes in initialize_handle to properly set the url and
type, given they're implicitly determined in the method
I left your change in


On Aug 7, 2014, at 11:59 AM, MrCreosote <notifications@github.com> wrote:

> In lib/Bio/KBase/AbstractHandle/AbstractHandleImpl.pm:
> 
> > @@ -95,6 +95,7 @@ sub insert_handle {
> >          
> >  	my (@fields, @values);
> >          foreach my $field (keys %$h) {
> > +                next if $field eq 'hid'; # inserts always get a new id
> Switching it to an error makes sense to me. I made that change because if you passed a handle with a hid to initialize_handle it'd replace existing handles with that ID, which, IIUC, we definitely don't want.
> 
> —
> Reply to this email directly or view it on GitHub.
>