Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have 4 level object structure which i need to place on Cache.

(我有4级对象结构,需要将其放置在Cache上。)

Once data is retrieved from cache, need to manipulate it before sending the response.

(从缓存中检索数据后,需要在发送响应之前对其进行处理。)

For this how i can do deep copy without reference.

(为此,我如何做深拷贝而无需参考。)

i tried _.clone and Object.assign .

(我尝试了_.clone和Object.assign。)

none of them worked

(他们都没有工作)

dbCharges (24) [model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model, model]

(dbCharges(24)[模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,模型,型号])

each model has internal objects

(每个模型都有内部对象)

model dataValues: {Service_Provider_Location_Charge_Id: 2084, Sequence: 2, Visible_On_Screen: true, Possible_Values: "Commercial;COM,Private;PRI,UK Military;MIL,Non UK Military;NMIL", Default_Value: null, …} isNewRecord: true eagerlyLoadedAssociations: [] _changed: {Service_Provider_Location_Charge_Id: true, Sequence: true, Visible_On_Screen: true, Possible_Values: true, Default_Value: true, …} _modelOptions: {timestamps: true, validate: {…}, freezeTableName: false, underscored: true, underscoredAll: true, …} _options: {isNewRecord: true, _schema: null, _schemaDelimiter: ""} _previousDataValues: {Service_Provider_Location_Charge_Id: undefined, Sequence: undefined, Visible_On_Screen: undefined, Possible_Values: undefined, Default_Value: undefined, …} Charge: Object ChargeType: model dataValues: {Charge_Type_Id: 2, Description: "Checkbox", Is_Active: true, Created_On: Fri Apr 01 2016 07:35:00 GMT+0100 (British Summer Time), Created_By: "SYSTEM", …} isNewRecord: true __eagerly

(模型数据值:{Service_Provider_Location_Charge_Id:2084,序列:2,Visible_On_Screen:true,可能值:“ Commercial; COM,Private; PRI,UK Military; MIL,Non UK Military; NMIL”,默认值:null,…} isNewRecord:true eagerlyLoadedAssociations: [] _changed:{Service_Provider_Location_Charge_Id:true,序列:true,Visible_On_Screen:true,可能值:true,Default_Value:true,...} _modelOptions:{timestamps:true,validate:{…},freezeTableName:false,下划线:true,underscoredAll: true,…} _options:{isNewRecord:true,_schema:null,_schemaDelimiter:“”} _previousDataValues:{Service_Provider_Location_Charge_Id:undefined,Sequence:未定义,Visible_On_Screen:undefined,可能的Values:undefined,Default_Value:undefined,…} Charge:对象类型模型数据值:{Charge_Type_Id:2,说明:“复选框”,Is_Active:true,Created_On:2016年4月1日星期五,GMT + 0100(英国夏令时),Created_By:“ SYSTEM”,…} isNewRecord:true __eagerly)

LoadedAssociations: [] _changed: {Charge_Type_Id: true, Description: true, Is_Active: true, Created_On: true, Created_By: true, …} _modelOptions: {timestamps: true, validate: {…}, freezeTableName: false, underscored: true, underscoredAll: true, …} _options: {isNewRecord: true, _schema: null, _schemaDelimiter: ""} _previousDataValues: {Charge_Type_Id: undefined, Description: undefined, Is_Active: undefined, Created_On: undefined, Created_By: undefined, …} After_Decimals: (...) Charge_Type_Id: (...) Created_By: (...) Created_On: (...) Datatype: (...) Description: (...) Is_Active: (...) Modified_By: (...) Modified_On: (...) Total_Length: (...) TypeDescription: (...) sequelize: (...) __proto : Model Charge_Id: 2 Charge_Type_Id: (...) Created_By: (...) Created_On: (...) Default_Value: (...) Default_Value_Rule_Id: (...) Default_Value_Rules: (...) Formula_Description: (...) Formula_Is_Active: (...) Formula_Name: (...) Formula_Notes: (...) Help_Text: (...) Invoice_Description: (...) Is

(LoadedAssociations:[] _changed:{Charge_Type_Id:true,描述:true,Is_Active:true,Created_On:true,Created_By:true,……} _modelOptions:{timestamps:true,validate:{…},freezeTableName:false,下划线:true, underscoredAll:true,…} _options:{isNewRecord:true,_schema:null,_schemaDelimiter:“”} _previousDataValues:{Charge_Type_Id:undefined,Description:未定义,Is_Active:undefined,Created_On:undefined,Created_By:undefined,…} After_Decimals: ...)Charge_Type_Id:(...)Created_By:(...)Created_On:(...)数据类型:(...)说明:(...)Is_Active:(...)Modified_By:(.。 ..)Modified_On:(...)Total_Length:(...)TypeDescription:(...)sequelize:(...)__proto :模型Charge_Id:2 Charge_Type_Id:(...)Created_By:(... )Created_On:(...)Default_Value:(...)Default_Value_Rule_Id:(...)Default_Value_Rules:(...)Formula_Description:(...)Formula_Is_Active:(...)Formula_Name:(...) Formula_Notes:(...)Help_Text:(...)发票说明:(...)是)

_Active: (...) Is_Editable: (...) Is_Editable_Rules: (...) Is_Visible_On_Delivery_Ticket: (...) Local_Description: (...) Modified_By: (...) Modified_On: (...) Name_On_Delivery_Ticket: (...) Possible_Values: (...) Sequence: (...) Service_Provider_Location_Charge_Id: (...) Visible_On_Screen: (...) Visible_On_Screen_Rule_Id: (...) Visible_On_Screen_Rules: (...)

(_Active:(...)Is_Editable:(...)Is_Editable_Rules:(...)Is_Visible_On_Delivery_Ticket:(...)Local_Description:(...)Modified_By:(...)Modified_On:(...)Name_On_Delivery_Ticket :(...)可能的值:(...)序列:(...)Service_Provider_Location_Charge_Id:(...)Visible_On_Screen:(...)Visible_On_Screen_Rule_Id:(...)Visible_On_Screen_Rules:(...))

  ask by Phani Kumar translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
348 views
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...