4

I have a store created from oracle database in geoserver. Now after I create layer out of the store. And when I try to access the layer or try to preview the layer, I get the warning message in console as

No primary key or unique index found for 'mylayer'

I see in oracle db, i have created the primary key and I have an index too. Can anybody suggest, what I am doing wrong, or am I missing something to setup in geoserver? I see the option

Primary key metadata table

while creating datastore. Is it anything to do with warning I am getting?

Thanks

2
  • As I'm experiencing the same issue: did you find a solution? Thanks!
    – user50066
    Commented Apr 5, 2015 at 15:07
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation.
    – Dan C
    Commented Apr 5, 2015 at 17:30

1 Answer 1

2

you need specify sortby parameter

http://example.com/geoserver/wfs?
   service=wfs&
   version=2.0.0&
   request=GetFeature&
   typeNames=namespace:featuretype&
   count=N&
   sortBy=attribute

http://docs.geoserver.org/stable/en/user/services/wfs/reference.html#getfeature

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.