TMongoDocument

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Raul
Posts: 4
Joined: Sat 28 Apr 2018 00:55

TMongoDocument

Post by Raul » Sat 28 Apr 2018 01:11

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

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TMongoDocument

Post by azyk » Wed 02 May 2018 07:33

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.

Raul
Posts: 4
Joined: Sat 28 Apr 2018 00:55

Re: TMongoDocument

Post by Raul » Sat 05 May 2018 15:43

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.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: TMongoDocument

Post by azyk » Mon 07 May 2018 07:54

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.

Post Reply