Page 1 of 1

TMongoDocument

Posted: Sat 28 Apr 2018 01:11
by Raul
Hi,

I downloaded Unidac 7.2.7 for RAD Studio XE4 to test them with MongoDB. I was be able to do the connection without issues, same with inserts, updates and deletes.

Reading the overview of https://www.devart.com/unidac/docs/mong ... rticle.htm I want to access to a document thru TMongoDocument as is told in the page

Code: Select all

var
  Document: TMongoDocument;
begin
  UniQuery1.Edit;
  Document := UniQuery1.GetObject('restaurants') as TMongoDocument;
But the compiler is not able to resolve TMongoDocument. I have searched in the documentation, the examples installed with the components but I did'n find anything.

Am I doing something wrong? What is the "uses" I have to include in order to user TMongoDocument?

Thanks in advance

Re: TMongoDocument

Posted: Wed 02 May 2018 07:33
by azyk
Thank you for the information. We will make change about uses in the documentation shortly.

To use the TMongoDocument class, add the MongoObjects unit to the uses clause.

Re: TMongoDocument

Posted: Sat 05 May 2018 15:43
by Raul
Thanks for the reply.

I wasn't be able to add MongoObjects. I get the error 'MongoObjects.dcu not found' during compiling. I searched in Unidac files and the proper unit is MongoObjectsUni.

Kind regards.

Re: TMongoDocument

Posted: Mon 07 May 2018 07:54
by azyk
You are right. There is a typo in my answer. You should read: To use the TMongoDocument class, add the MongoObjectsUni unit to the uses clause.