obscure-com / ti_touchdb

Titanium wrapper around Couchbase Mobile
102 stars 34 forks source link

View Name #87

Closed webfrank closed 9 years ago

webfrank commented 9 years ago

As view names are global I think the name should be composed on Model name and View name defined inside Model, this way resulting view name is unique and I could use the same "byParent" name on different models/collections.

pegli commented 9 years ago

I've updated the sync adapter so it automatically determines the model name and uses that to prefix the view names for that model; for example, if the model name is "client" and the adapter config defines a view named "byLastName", the actual view name in the database will be client/byLastName.