From: Michael Kennedy <mkennedy66996...@gmail.com>
Date: Wed, 9 Jun 2010 11:42:02 -0700
Local: Wed, Jun 9 2010 2:42 pm
Subject: Re: [NoRM MongoDB] Re: Selecting (max) OR identity field
I've been working on a project which has the exact same requirements. Here's I have a proper internal ID using ObjectId, but for referencing from URLs The actual code is below. Best regards, Note: UniqunessMethod is a delegate I pass in which basically does a select private string GetNewPublicId<TEntity>(Func<string, TEntity> while (!unique) } id = sb.ToString(); TEntity entity = UniqunessMethod(id); unique = entity == null; } return id; }
On Tue, Jun 8, 2010 at 8:50 AM, SaraC <sarajchi...@gmail.com> wrote: > The problem is this application is a url shortener and requires an > identifier that can be hashed and > used for those purposes. I don't know of another solution while > ensuring uniqueness. > On Jun 8, 2:49 am, Ken Egozi <egoz...@gmail.com> wrote: > > Now using the ObjectId approach has its limitations also, mainly the size > > The docs for Hibernate/NHibernate are all full with reasons to avoid > > On Tue, Jun 8, 2010 at 9:35 AM, Jørn Wildt <j...@fjeldgruppen.dk> wrote: > > > Beware of concurrency issues: two reades may read MAX() = 10 and then > > > /Jørn > > > On Jun 8, 8:19 am, SaraC <sarajchi...@gmail.com> wrote: > > > > I understand that the Mongo Ids are timestamps and can be used as > > > > Thanks a bunch! > > > -- > > -- > -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||