couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Yiu <alex...@yahoo.com>
Subject "_attachements" field name in CouchDB
Date Tue, 06 Jul 2010 03:36:11 GMT


Hi, all, 

I am a newbie to CouchDB. Sorry for a potential newbie question. 

I am wondering whether we can associate binary attachment to a field name defined by users,
instead of the generic pre-defined "_attachments" field name? If we can do that, we can manage
association between multiple attachments and different parts of the JSON document easier.


For example, if a JSON doc represents a purchase order, a PO can have multiple line items.
Each line item may have optional attachment. 

[ { "line" : 1, "price": "33.4", "picture attachement" : { ... } } , { "line": 2, ... } ]

Within the "picture attachement" object, it contains some special fields to denote it is an
attachement.
e.g.  "picture attachement" : { "_attachment_id": "..." , ... }

We can do something to that extent already. That is great. 

If not, do we have a JIRA issue for that already? 
If we have not that JIRA issue yet, does it worth log an issue there now? 


Thank you so much for answering this newbie question!!!


Alex Yiu



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message