Different questions about object.

1.- Is it different utility create object in the cloud wich “mongo:createObject” that I create object in the client wich c"createObject"?. What it is better?

2.- I am to do one object.

coronium:createObject (“MyClass”, {nombre = “Manu”, activo = true},

 function (e)

  print (e.error) – Line 1

  print (e.result.objectId) – Line 2

  if not e.error then

    print (“Ok”) 

  end

 end)

But in Line 1 I have this ( find one failed: MyClass ), and in the Line 2 I have (attempt to index field ‘result’ (a nil value) Why?.

The object is created but I have this “error”

How I can know the Id of this object if I can not see the result?.

Thank you.

Hi,

Yes there are 2 different variations for the server and client.

Server: http://docs.coronium.io/en/latest/server/MongoDB/#mongocreateobject

CoronaSDK: http://docs.coronium.io/en/latest/client/DataObjects/#createobject

But is better to utility one to other or it similar.

When I created a Object as I can know it Id if I can not read the result (automatic).

Thank You

Hi,

What version are you running? And where are you hosting?

Let me know, and I’ll take a look.

Cheers.

Hi,

Yes there are 2 different variations for the server and client.

Server: http://docs.coronium.io/en/latest/server/MongoDB/#mongocreateobject

CoronaSDK: http://docs.coronium.io/en/latest/client/DataObjects/#createobject

But is better to utility one to other or it similar.

When I created a Object as I can know it Id if I can not read the result (automatic).

Thank You

Hi,

What version are you running? And where are you hosting?

Let me know, and I’ll take a look.

Cheers.