Hi there,
I'm a mongo + mongomapper newbie, my question is, after following the
examples in these slides:
1. http://www.slideshare.net/mongosf/ruby-development-and-mongomapper-john-nunemaker/39
2. Slide 40
3. Slide 41
I ended up with 2 collections joined on a foreign id... Is that right?
I was expecting to see something similar to what...
I've got an app that I am building in Rails 3 (and MongoDB using Mongoid). I want to be able to send Apple Push Notifications to iOS devices. I am aware of PRX's apn_on_rails and samsoffes' apple_push_notification gems, but they do not appear to work correctly in Rails 3.
Are there any tutorials out there for setting up an APN server in...
Is there a way in MongoDB to have a foreign key with a 'ON DELETE CASCADE' functionality?
I know you can use DBRef as a sort of foreign key but when the item in a collection where the reference points to is removed, the reference returns null. But i want that the item where the reference belongs to gets removed. How do i do this?
Or do...
This example makes it seem like both are used (included) in order to make a class a persistent model, but it is not clear when I should use one or the other.
...
Could I declare a model with a key called :key, for instance? Is there any word I can't use for a key?
...
Hi,
I have Java app that takes data from external app. Incoming JSONs are in Strings. I would like to parse that Strings and crate BSON objects.
Unfortunate I can't find API for that in Java's BSON implementation.
Do I have use external parser for that like GSON?
...
How do I do the following in one operation:
Find or create object by some key:value pairs
Increment properties on the object.
I am doing this now:
Model.find_or_create_by_this_and_that(this, that).increment("a" => 1, "b" => 1)
What's the correct way to do that?
...
If one were to copy twitter's DM feature, how would you go about designing the schema for it? I'm able to send and reply to messages, but my issue is how do I keep track of the sent messages? If Bob sends Amy a message, Amy will see Bob's message. Bob also has a copy of his message located in his "sent folder."
Right now, each message ...
I'm trying to implement blog post storage using mongo db.
I've got two domain entities:
"Blog post" and "Author"
Currently I've added AuthorId property to blog post entity. Is that the right approach to store relation between objects?
...
I'm in the process of converting my Rails app to use mongodb through mongoid. I have two questions relating to indexes. I think I know the answer, but I want confirmation from someone who has more experience with mongodb.
Let's look at the following example where I have one relational association between Users and Posts.
user.rb
class...
I'm looking for a common data access framework that will provide portability across various nosql databases like SimpleDB, Azure Tables, Cassandra, CouchDB, MongoDb, etc. I'm building an app and would like my customers to be able to use which ever nosql store they want.
In a more relational scenario, I'd use Linq over nHibernate or E...
Hi,
I'm a MongoDB newbie and wanted to ask how to write an update command involving upsert and list.
Basically I want to accomplish something like this:
{"_id" : ObjectId("4c28f62cbf8544c60506f11d"),
"some_other_data":"goes here",
"trips": [
{"name": "2010-05-10",
"loc": [{"lat":21.321231, "lng": 16.8783234, "updated_at": ...
Say you're a shop selling products, each with a certain set of properties... for instance let's say you have drills. There are concrete bits, spade bits, etc, but they all have some concept of diameter... so if you have some product {price: 14.95, diameter: 3}, whatever, but decide you want the store to be super generic and allow users t...
OK, So I know that MongoDB is the 'next big thing' in databases, and I'm exited.
But i can't find an article that deals with how different it is using Mongo.
Do we still have migrations? relatoinships? will has_one still work? And will we ever see support in activeRecord or is MongoMapper up to the job!
I'm also wondering if they is a...
The MongoDB docs on the $in conditional operator don't say anything about order. If I run a query of the form
db.things.find({'_id': {'$in': id_array}});
what will be the order of the returned results? And is there a way for me to tell MongoDB "I want the results sorted so that they're in the same order as the ids in id_array?"
...
I'm starting a new project with Mongo, NoRM and MVC .Net.
Before I was using FluentNHibernate so my IDs were integer, now my IDs are ObjectId. So when I have an Edit link my URL looks like this :
WebSite/Admin/Edit/23,111,160,3,240,200,191,56,25,0,0,0
And it does not bind automaticly to my controller as an ObjectId
Do you have any ...
According to the PyMongo docs, update() can only update a single document at a time. Let's say I have 100 documents I want to update simultaneously. That's a lot of overhead. Is there a way to update multiple documents with a single MongoDB query through PyMongo?
...
When adding a key to an existing model (with existing data) via MongoMapper, I can create new documents with the new key but when trying to access existing documents using that same key it fails stating that it's an "undefined method."
I was wondering if anyone had any insight.
Thanks in advance!
(Yes, these examples are truncated.)
...
hi all
I am trying to work out the best way to store my daat using mongodb and mongomapper.
I have category and each category can be described by many attributes so length in mm, weight in kg etc.
I want each user to be able to create their own attributes to descibe a category of products.
So forexample:
user A wants to store his c...
hi all
I have a category collection and each category has a array of hashes containing attributes names and units to create a inout form with, to add a product of that category.
for example category car fields - {name : length, unit : mm}, {name : weight, unit : kg}.
Problem is i would this site to be multi-lingual and therefore need ...