[OSM-dev] Datamodel relation/member constraints

Thomas Wood grand.edgemaster at gmail.com
Fri May 30 22:18:35 BST 2008


On Fri, May 30, 2008 at 9:21 PM, Stefan de Konink <skinkie at xs4all.nl> wrote:
> Second question:
>
> Are there currently any constraints on relations members based on:
>
> 1) Sequence
>
> and/or
>
> 2) 'Reuse'
>
>
> So would it be allowed to do:
>
> type=node ref=1 role=from
> type=node ref=2 role=at
> type=node ref=1 role=at
> type=node ref=3 role=to
>
> Or is the second 1 not allowed?
>
> Next to this; can a user explicitly trust the sequence 1,2,1,3; or is
> this currently not guaranteed?
>
>
> Stefan
>

If by ref you mean node id, then yes, the second 1 is not allowed.
The API used to throw an unhandled exception back at you (500) if you
did it because of an index constraint on the database.
This has recently been fixed to actually return a nice error and stop
corrupting the database. (Although it may not have been deployed yet)

-- 
Regards,
Thomas Wood
(Edgemaster)




More information about the dev mailing list