Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Does it really deep copy? #27

Open
doppl-neal opened this issue Apr 27, 2021 · 0 comments
Open

Question: Does it really deep copy? #27

doppl-neal opened this issue Apr 27, 2021 · 0 comments

Comments

@doppl-neal
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant