Java, Mongo - BasicBSONList can only work with numeric keys not:

Problem


BasicBSONList can only work with numeric keys, not: [url]

Solution:

Looking at the Intelij debug output the solution became obvious:

offers = {BasicDBList@5718}  size = 1
  0 = {BasicDBObject@7368}  size = 12
     0 = {LinkedHashMap$Entry@7371} "@type" -> "Offer"
     1 = {LinkedHashMap$Entry@7372} "availability" ->
     2 = {LinkedHashMap$Entry@7373} "name" -> "xxx"
     3 = {LinkedHashMap$Entry@7374} "description" -> "yyy"
     4 = {LinkedHashMap$Entry@7375} "itemCondition" ->
     5 = {LinkedHashMap$Entry@7376} "price" -> "378.56"
     6 = {LinkedHashMap$Entry@7377} "priceCurrency" -> "EUR"
     7 = {LinkedHashMap$Entry@7378} "priceSpecification" -> " size = 1"
     8 = {LinkedHashMap$Entry@7379} "offerID" -> "2"
     9 = {LinkedHashMap$Entry@7380} "seller" -> " size = 2"
     10 = {LinkedHashMap$Entry@7381} "sku" ->
     11 = {LinkedHashMap$Entry@7382} "url" -> "google.com"




Comments

Popular posts from this blog

Oracle - duplicate fields in RECORD,TABLE or argument list are not permitted

Oracle - ORA-29282: invalid file ID, ORA-06512: at "SYS.UTL_FILE"