Posts Tagged ‘mongo_orm’
mongo_orm Exception: missing bson key: publish_acl (Exception)
When you extend your field definitions in the mongo_orm document classes, specifically with embedded documents, you might run into the following runtime (!) error: Exception: missing bson key: <name> (Exception) This is not an error in your code – your code is raising, because the database structure is not as it expects it to be!…
Weiterlesenmongo_orm custom name for collection
mongo_orm will automatically determine the name for your collection by using the Module and Class name, and appending an “s”. In cases where you want to name your collection, you can simply do this: class PapiTest < Mongo::ORM::Document collection_name “Buster” field test : String end get “/” do pt = PapiTest.new pt.test = “I want…
WeiterlesenInstructions for adding a user to a mongo database for mongo_orm
You don’t want your web application to access the database using your database admin user. Additionally you want it to access only one specific database – maybe you have additional databases running in your mongo instance. Prerequisites: mongo_orm expects the database configuration as environment variables or as a file config/database.yml in your project. The config/database.yml…
WeiterlesenBuilding a persistent in-line editing experience with Crystal, MongoDB (datanoise / sam0x17)
As documentation is still sparse, I would like to add some. This is what I am building currently: The individual fields are going to be editable with an inline editor, which will automatically save to the backend – no need for reloading the whole page. The point of the whole is a backend for my…
Weiterlesen