Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.6.0-beta3
    • Fix Version/s: None
    • Component/s: Transactions/Locking
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Hmmm... usually people do use an automatically generated primary key,
      but in this case you're trying to provide one. I'm not sure the wfs 1.0
      specification supports this, wfs 1.1 talks about it but again I'm
      not sure we're bound to support this use case by the spec.

      Anyways, if the gml parser sets the fid in the feature, it would just
      be a matter of modifying the BasicFidMapper class in Geotools to use
      the fid provided in the feature. Justin, do you have the information
      I miss at your fingertips?

      Nope, I think you have it right andrea. There is nothing in the spec
      that says that those ID's must be used to used as the id's to persist
      the feature, as its storage dependent.

      Would not using the ID specified by the user be tricky? I guess its
      doable... although some additional checks for uniqueness and all that
      would have to be performed.

      It should be doable and relatively easy. If the xml parser generates
      a feature with the id that the user specified, we just need to change
      the basic fid mapper. The database will make sure the value is unique.
      What do you think?
      Yeah, seems logical. The parser already uses the id to create the
      feature. What will be the behavior when a bad fid is encountered. Just
      ignore it? Or throw exception? I think to be spec compliant we will just
      have to ignore it and generate a warning.
      > >

        Activity

        Hide
        Sébastien Geindre added a comment -

        description is a email discussion between adnrea and justin.
        i forgot to mention it.

        Show
        Sébastien Geindre added a comment - description is a email discussion between adnrea and justin. i forgot to mention it.
        Hide
        Chris Holmes added a comment -

        The WFS 1.1 spec definitely has an option to let the user specify the FID, instead of having it set by the server. So what you're wanting is supported by the spec, it's just not an option GeoServer supports.

        The tricky thing is what different datastores do, as not all of them may be able to handle it. Indeed, if the primary key is set up to be auto-incremented then it just won't work. So you have to figure out the right strategies for a bunch of different edge cases - for each datastore for each possible way to configure primary keys for each of the WFS insert options. So I'd maybe start with that matrix, to figure out what needs to be done, and then implement from there. If not then you're going to introduce a lot of uncertainty.

        Show
        Chris Holmes added a comment - The WFS 1.1 spec definitely has an option to let the user specify the FID, instead of having it set by the server. So what you're wanting is supported by the spec, it's just not an option GeoServer supports. The tricky thing is what different datastores do, as not all of them may be able to handle it. Indeed, if the primary key is set up to be auto-incremented then it just won't work. So you have to figure out the right strategies for a bunch of different edge cases - for each datastore for each possible way to configure primary keys for each of the WFS insert options. So I'd maybe start with that matrix, to figure out what needs to be done, and then implement from there. If not then you're going to introduce a lot of uncertainty.
        Hide
        Chris Holmes added a comment -

        Scheduling for 1.6.x, and I fear it may have to be later, since this may involve deep geotools changes. But it can't be beta4 unless there's a patch right now.

        Show
        Chris Holmes added a comment - Scheduling for 1.6.x, and I fear it may have to be later, since this may involve deep geotools changes. But it can't be beta4 unless there's a patch right now.
        Hide
        Andrea Aime added a comment -

        Justin, do you know how things are respect to this one?

        Show
        Andrea Aime added a comment - Justin, do you know how things are respect to this one?
        Hide
        Justin Deoliveira added a comment -

        I would say this is a won't fix. The spec says nothing about a server accepting ID's from the client in an insert. THe server can generate ID's however it sees fit. The only contract is that when a feature id is published by the server it is persistent so that the clientc an reliably make queries with it. So when we serve up tables that have no primary key we are breaking the spec in that regard.

        Show
        Justin Deoliveira added a comment - I would say this is a won't fix. The spec says nothing about a server accepting ID's from the client in an insert. THe server can generate ID's however it sees fit. The only contract is that when a feature id is published by the server it is persistent so that the clientc an reliably make queries with it. So when we serve up tables that have no primary key we are breaking the spec in that regard.
        Hide
        Andrea Aime added a comment -

        Bulk closing all resolved issue that have not gotten any more feedback or comment in the last month

        Show
        Andrea Aime added a comment - Bulk closing all resolved issue that have not gotten any more feedback or comment in the last month

          People

          • Assignee:
            Justin Deoliveira
            Reporter:
            Sébastien Geindre
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: