Schematic design for Ember data in Ember.js

We have a schemaless database on MongoDB in Rails. I want to know how to use such an emberjs schema design to integrate with such a construct.

I cannot find documentation if this can be achieved or if there is any best practice

Can someone help me with this?

EDIT: The question is how to use the EmberJS persistent store for the MongoDB Rails schematic reserve.

+4
source share
3 answers

The first two links below should help. See how the first link sets primaryKey: '_id' to recognize mongodb _id , and the second link shows how to make the active_model_serializer gem with mongoid , the gem is the recommended diamond command for working with rails and ember data:

https://github.com/dagda1/workoutzenith/tree/master/app/models

https://github.com/dagda1/workoutzenith/blob/master/config/initializers/active_model_serializer_mongoid_initializer.rb

If you encounter problems with the mongodb and ember-data embedded documents, this should solve the following:

Embedded Ember data objects stored as separate objects

Read the link below and explore 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 does not use rails, but nodejs, mongodb and emberjs. Mongodb + emberjs may still be useful to you

https://github.com/abelaska/nodejs-emberjs-mongodb

+5
source

There is still no clear and scalable solution on how to apply Ember to a scenario in which a Rails database such as MongoDB stores a document of any depth with unknown fields.

There are several ways to normalize, but with existing REST / REST + DS we may have to write a lot of code for serialization and serialization.

Take a look at the discussions:

https://github.com/emberjs/data/issues/53#issuecomment-9196555 https://github.com/emberjs/data/issues/100

If someone finds a better choice, please share with me.

0
source

All Articles