[Developers] Unlinking Objects of Type...

Kurt Bollacker kurt at metaweb.com
Thu Aug 23 05:05:09 UTC 2007


On Wed, Aug 22, 2007 at 08:31:09PM -0700, Michael Jones wrote:
> Hi Folks,
> 
> I'm looking for a way to unlink some instances of a specific type (I'd
> prefer to delete them entirely, but that another discussion.)  There
> are a lot of them, so manually doing it is out.  I could write a
> script, but it seems this ought to be doable with a single query.
> 
> My attempts, which all fail due to uniqueness errors, look like this:
> 
> {"query":[{
>     type:[{
>       {"id":"/user/szaijan/fantasy_football/statline",
>        "type":"/type/type"
>       },
>       {"connect":"delete",
>        "id":"/user/szaijan/fantasy_football/projection",
>        "type":"/type/type"
>       }]
>   }]
> }
> 
> Does anyone know how to go about this correctly without writing a
> script?  The brute force method would be to query all the ids of
> instances with the types I want to remove, then remove those types in
> a seperate query.  Hopefully, there's a better way.

I should point out that if you delete the /type/object/type link of a
topic, it does not automatically remove the properties associated with
that type.  They become harder to find (you must use the full path ID
of the property, and they don't show up in the Web UI), but are still
exist and are usable.

								Kurt :-)



> ____________________________________________________________________
> 
>  Michael Jones, Gamer at Large
> szaijan at ternea.com
> ____________________________________________________________________
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers


More information about the Developers mailing list