You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 structs (of different types), each of these structs have embedded structs. The embedded structs have the same property name, however, are different types.
My assumption is that deepcopier will copy the data of the embedded structs the same way it copies the data of the structs at the top level? Am I missing something?
type Struct1 struct {
ID string
Description string
NotificationDate string
CustomerSiteID *string
CustomerSite CustomerSiteEntity
ClientAssetID *string
ClientAsset ClientAssetEntity
}
type Struct2 struct {
ID
Description string json:"description"
NotificationDate string json:"notificationDate"
CustomerSiteID string json:"customerSiteId"
CustomerSite CustomerSiteModel json:"customerSite" -- this is empty ClientAssetID string json:"clientAssetId"ClientAsset ClientAssetModel json:"clientAsset" -- this is empty
}
I am just starting to use this library, I am wondering if I am doing something incorrect?
Thank You,
Neal
The text was updated successfully, but these errors were encountered:
I have 2 structs (of different types), each of these structs have embedded structs. The embedded structs have the same property name, however, are different types.
My assumption is that deepcopier will copy the data of the embedded structs the same way it copies the data of the structs at the top level? Am I missing something?
type Struct1 struct {
ID string
Description string
NotificationDate string
CustomerSiteID *string
CustomerSite CustomerSiteEntity
ClientAssetID *string
ClientAsset ClientAssetEntity
}
type Struct2 struct {
ID
Description string
json:"description"
NotificationDate string
json:"notificationDate"
CustomerSiteID string
json:"customerSiteId"
CustomerSite CustomerSiteModel
json:"customerSite" -- this is empty ClientAssetID string
json:"clientAssetId"ClientAsset ClientAssetModel
json:"clientAsset" -- this is empty}
I am just starting to use this library, I am wondering if I am doing something incorrect?
Thank You,
Neal
The text was updated successfully, but these errors were encountered: