cancel
Showing results for 
Search instead for 
Did you mean: 

auto-generate documentID

techniq808
Champ in-the-making
Champ in-the-making
Does the document management functionality allow the (auto)generation of a documentID for use in the properties/metadata for documents (MS Word) for example?
4 REPLIES 4

dray
Champ in-the-making
Champ in-the-making
This is a great question.  With an auto generated document ID it doesn't matter what the extension is to the piece of content.  For example, lets say a company recieves a piece of content ( .doc format) from an outside soource and checks it into the library as revision 1.  They then recieve a new revision that is in .docx format because the source company upgraded Office.  Seeing that it is not of the same extension type as the original piece of content how can this be checked into the library as revision 2?  When the third revision comes in, it is sent as a .pdf because the source company does not want it changed. 

All 3 pieces of content are revisions, but in different formats.  Can this be done since the key metadata value that is being used by the system is the "Name: field?  Microsoft made this same mistake with SharePoint in not assigning a Document ID to the content.

mrogers
Star Contributor
Star Contributor
yes the versioning is independent of the mime type.   So you can do that sort of thing.

dray
Champ in-the-making
Champ in-the-making
The problem is that when a new piece of content is uploaded into the system, it automatically assigns the name of the content the file name.  During the upload process there is no option to change the name of the content.  Not the name of the file, but the content such as a Document ID.

After the initial upload, the metadata has to be modified and the extension has to be removed from the Name field in order to see content of different types for the next upload.

If the Name field is incremented for each new piece of content and not populated with an extension then this would not have to be done.

So is there a way to auto populate the "Name" field with a system generated ID that has no extension associated to it?

I am analyzing this software for use in our company, but can't move forward if we can't do this.  We can't expect the users to open the metadata after check in and change the values.

danieljackson
Champ in-the-making
Champ in-the-making
This was a bit unclear from the documentation, so I've improved one of the wiki
pages to talk about this.

Basically, if your class is annotated as @MongoDocument, it needs to have @MongoID
and @MongoCollectionName fields (both must be Strings). You should never have to
set these fields yourself, Mongo will generate ID for new documents, and Morphia
will automatically populate the @MongoID field when mapping from a DBObject.

See here for more info:
http://code.google.com/docreader/#p=morphia&s=morphia&t=MongoDocument

_________________________________________________________________


Want to get-on Google's first page and loads of traffic to your website? Hire a SEO Specialist from Ocean Groups seo pecialist