Diseño sin esquema para datos de Ember en Ember.js
Frecuentes
Visto 1,182 veces
4
We are having schemaless database on MongoDB in Rails. I want to know how to use such a schemaless emberjs data design to integrate with such a design.
I am not able to find any documentation on if this can be achieved or if there is any best practice
Puede alguien ayudarme con esto ?
EDIT: Question is on how to use EmberJS persistent datastore for a schemaless MongoDB Rails backend.
3 Respuestas
5
The first two links below should help. See how the first link is setting primaryKey: '_id' to recognize mongodb _id and the second link shows how to make active_model_serializer gem work with mongoide, the gem is ember-core team's recommended gem for working with rails and ember-data :
https://github.com/dagda1/workoutzenith/tree/master/app/models
If you run into problems with embedded mongodb documents and ember-data, this should solve it:
Objetos incrustados de Ember-data almacenados como objetos separados
Read the link below and also examine the github project:
http://tardate.blogspot.co.uk/2012/03/rails-ember-mongodb-bootstrap.html
https://github.com/evendis/rails-ember-mongo-bootstrap-demo
This is not using rails but nodejs, mongodb and emberjs. The mongodb + emberjs might still be useful to you
contestado el 23 de mayo de 17 a las 13:05
0
There is still no clear and scalable solution I see of how to apply Ember to scenario where the Rails backend database like MongoDB stores document of any depth with unknown fields.
There are some ways of normalizing but still with existing REST/REST+DS we may have to write a lot of code to serialize and de serialize.
Take a peek on the discussions:
https://github.com/emberjs/data/issues/53#issuecomment-9196555 https://github.com/emberjs/data/issues/100
If some one finds a better pick, please share with me.
Respondido 20 Oct 12, 11:10
-2
Jus follow the links http://robert-reiz.com/2012/03/05/rails-mongodb-tutorial/, http://www.mongodb.org/display/DOCS/Rails+3+-+Getting+Started
Respondido 28 ago 12, 10:08
Question is on how to use EmberJS persistent datastore for a schemaless MongoDB Rails backend. - sudhanshu
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas ruby-on-rails mongodb ember.js nosql or haz tu propia pregunta.
he visto github.com/evendis/rails-ember-mongo-bootstrap-demo My issue with schemaless DB is that in the EmberJS model aquí I don't have any pre-defined resourceProperties . So how can we use any thing like ember-rest, ember-data etc. - sudhanshu