IoTKETI / Mobius

oneM2M IoT Server Platform
http://developers.iotocean.org/archives/module/mobius
BSD 3-Clause "New" or "Revised" License
134 stars 87 forks source link

cnf field in lookup table #7

Open beaver71 opened 6 years ago

beaver71 commented 6 years ago

Since cnf (contentInfo) is a field only for CIN (contentInstance) why there is a cnd field also in "lookup" table? As a consequence if you try to create a CIN resource specifying cnf field, then it is created with cin.cnf = null.

beaver71 commented 6 years ago

Checking the code of sql_action.js you can see cnf field as argument in insert_lookup:

exports.insert_lookup = function(ty, ri, rn, pi, ct, lt, et, acpi, lbl, at, aa, st, mni, cs, cnf, sri, spi, callback)

but it is never used in the SQL statement.

IoTKETI commented 6 years ago

you are right. lookup tabel is about universal and common attribute in oneM2M spec. Rest of the table is about each resource. The reason for add cnf to lookup is for reduce time of access database in first. but not use this. it's just remaining. it'll be remove later.