Received: by 10.180.99.102 with SMTP id ep6mr894451wib.1.1337459867435; Sat, 19 May 2012 13:37:47 -0700 (PDT) X-BeenThere: mongodb-user@googlegroups.com Received: by 10.180.76.202 with SMTP id m10ls1426977wiw.1.canary; Sat, 19 May 2012 13:37:21 -0700 (PDT) Received: by 10.180.88.33 with SMTP id bd1mr63798wib.2.1337459841927; Sat, 19 May 2012 13:37:21 -0700 (PDT) Received: by 10.180.88.33 with SMTP id bd1mr63797wib.2.1337459841902; Sat, 19 May 2012 13:37:21 -0700 (PDT) Return-Path: Received: from mail-we0-f196.google.com (mail-we0-f196.google.com [74.125.82.196]) by gmr-mx.google.com with ESMTPS id ef4si1878581wib.1.2012.05.19.13.37.21 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 19 May 2012 13:37:21 -0700 (PDT) Received-SPF: pass (google.com: domain of assisten...@gmail.com designates 74.125.82.196 as permitted sender) client-ip=74.125.82.196; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of assisten...@gmail.com designates 74.125.82.196 as permitted sender) smtp.mail=assisten...@gmail.com; dkim=pass header...@gmail.com Received: by wefh52 with SMTP id h52so445415wef.3 for ; Sat, 19 May 2012 13:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Cdztg1MAeGp1YLvEpK4mUc0TK1EHKlUbjzIwqhhhKBw=; b=zc1EHryObXCp/5fTRxCewPqUqmWQ3+4MG2o8hhc2uzxzY3slQUPzTfaSWKWrbRicwg mfCcY+zVv5V1FrewGi1k1bu0+/t8072cqW6zrHuM+ydeJ+roSjJVifA64Kjs7deJU4xe y83ep9fH1MwbZgi72mxc4f069oeA4x4YMNdACQCY76dMZBw3CMXaQXN6pCjYYwdvrbEk cYmve3v7NJWEKlJTYcR6iijw4UvbcLJBTBIj4ZufplopzkkOa4zf7woJDNYOkx0bMHc4 y4lMan1EN+IK2dUUY0hZsq8DiDBUUdqQzQPNQ4CxEvAmQyqqfnuXKaFIeYeK/01MogfG W+BQ== MIME-Version: 1.0 Received: by 10.180.93.38 with SMTP id cr6mr11882024wib.16.1337459841720; Sat, 19 May 2012 13:37:21 -0700 (PDT) Received: by 10.223.116.11 with HTTP; Sat, 19 May 2012 13:37:21 -0700 (PDT) In-Reply-To: References: Date: Sat, 19 May 2012 22:37:21 +0200 Message-ID: Subject: Re: [mongodb-user] Mongo Id From: Giovanni Fabio To: mongodb-user@googlegroups.com Content-Type: multipart/alternative; boundary=f46d0438931bc462c004c069a2ea --f46d0438931bc462c004c069a2ea Content-Type: text/plain; charset=ISO-8859-1 SELECT * FROM tablemane WHERE (a=1 OR b=1) AND (a=2 OR b=2) examples of mongodb query in mongodb ??? 2012/5/19 Scott Hernandez > An example of what? > > On Sat, May 19, 2012 at 2:27 PM, Fabio Ebner wrote: > > can you send one example? i use ObjectID to create automatic the id. > > > > > > 2012/5/19 Scott Hernandez > >> > >> You can use any id generation system you want. By default an ObjectID > >> is suggested since it doesn't require any interaction with the server > >> to generate and is unique. > >> > >> You can simply pass the (hex) string version of the ObjectId as the id > >> to your html/web-app; that works just fine. > >> > >> If you want to maintain a sequence/counter there are example in the > >> docs and an example annotation in morphia you can use. It is not > >> suggested as it requires going to the server before every insert to > >> get an id. > >> > http://www.mongodb.org/display/DOCS/How+to+Make+an+Auto+Incrementing+Field > >> > >> > http://code.google.com/p/morphia/source/browse/trunk/morphia/src/main/java/com/google/code/morphia/utils/LongIdEntity.java > >> > >> On Sat, May 19, 2012 at 11:25 AM, FabioEbner > wrote: > >> > Hi, i create one class with morphia.. and put one ObejctID, but i > wanna > >> > know > >> > if i have another ID , something like SGDB id, sequential id, because > i > >> > need > >> > to pass the id to view and than back to front. so i can olny pass the > id > >> > > >> > > >> > tks > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "mongodb-user" group. > >> > To post to this group, send email to mongodb-user@googlegroups.com > >> > To unsubscribe from this group, send email to > >> > mongodb-user+unsubscribe@googlegroups.com > >> > See also the IRC channel -- freenode.net#mongodb > >> > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "mongodb-user" group. > >> To post to this group, send email to mongodb-user@googlegroups.com > >> To unsubscribe from this group, send email to > >> mongodb-user+unsubscribe@googlegroups.com > >> See also the IRC channel -- freenode.net#mongodb > > > > > > -- > > You received this message because you are subscribed to the Google > > Groups "mongodb-user" group. > > To post to this group, send email to mongodb-user@googlegroups.com > > To unsubscribe from this group, send email to > > mongodb-user+unsubscribe@googlegroups.com > > See also the IRC channel -- freenode.net#mongodb > > -- > You received this message because you are subscribed to the Google > Groups "mongodb-user" group. > To post to this group, send email to mongodb-user@googlegroups.com > To unsubscribe from this group, send email to > mongodb-user+unsubscribe@googlegroups.com > See also the IRC channel -- freenode.net#mongodb > --f46d0438931bc462c004c069a2ea Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable SELECT * FROM tablemane WHERE (a=3D1 OR b=3D1) AND (a=3D2 OR b=3D2)
examples of mongodb query
in mongodb ???

2012/5/19 Scott Hernandez <scotthernandez@gma= il.com>
An example of what?

On Sat, May 19, 2012 at 2:27 PM, Fabio Ebner <fabioeb...@gmail.com> wrote:
> can you send one example? i use ObjectID to create automatic the id. >
>
> 2012/5/19 Scott Hernandez <scotthernan...@gmail.com>
>>
>> You can use any id generation system you want. By default an Objec= tID
>> is suggested since it doesn't require any interaction with the= server
>> to generate and is unique.
>>
>> You can simply pass the (hex) string version of the ObjectId as th= e id
>> to your html/web-app; that works just fine.
>>
>> If you want to maintain a sequence/counter there are example in th= e
>> docs and an example annotation in morphia you can use. It is not >> suggested as it requires going to the server before every insert t= o
>> get an id.
>> http://www.mongodb.org/display/DOCS/= How+to+Make+an+Auto+Incrementing+Field
>>
>> http://code.google.com/p/morphia/source/browse/trunk/morphia/sr= c/main/java/com/google/code/morphia/utils/LongIdEntity.java
>>
>> On Sat, May 19, 2012 at 11:25 AM, FabioEbner <fabioeb...@gmail.com> wrote:
>> > Hi, i create one class with morphia.. and put one ObejctID, b= ut i wanna
>> > know
>> > if i have another ID , something like SGDB id, sequential id,= because i
>> > need
>> > to pass the id to view and than back to front. so i can olny = pass the id
>> >
>> >
>> > tks
>> >
>> > --
>> > You received this message because you are subscribed to the G= oogle
>> > Groups "mongodb-user" group.
>> > To post to this group, send email to mongodb-user@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > mongodb-user+unsubscribe@googlegroups.com
>> > See also the IRC channel -- freenode.net#mongodb
>>
>> --
>> You received this message because you are subscribed to the Google=
>> Groups "mongodb-user" group.
>> To post to this group, send email to mongodb-user@googlegroups.com
>> To unsubscribe from this group, send email to
>> mon= godb-user+unsubscribe@googlegroups.com
>> See also the IRC channel -- freenode.net#mongodb
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb= -user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user= +unsubscribe@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

--f46d0438931bc462c004c069a2ea--