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

TDataSetUtils.DataSetToObject Compliant with TNullableType #336

Closed
ads69 opened this issue Mar 5, 2020 · 7 comments
Closed

TDataSetUtils.DataSetToObject Compliant with TNullableType #336

ads69 opened this issue Mar 5, 2020 · 7 comments
Assignees
Labels
accepted Issue has been accepted and inserted in a future milestone
Milestone

Comments

@ads69
Copy link

ads69 commented Mar 5, 2020

Hi,
today I use something like : TDataSetUtils.DataSetToObject(lDataSet, lCustomer);
I would like to change some properties of my Object to make them Nullable.
But doing this calling this procedure raise an error saying : Nullable must have a value.
How could I do to make it compatible with TNullable Type ?
Best reagrds

Armindo

@danieleteti
Copy link
Owner

Can you provide a simple test case with just one procedure which show the problem?

@danieleteti danieleteti self-assigned this Mar 5, 2020
@ads69
Copy link
Author

ads69 commented Mar 5, 2020

Ok Daniele, will do a test case tonight.

@ads69
Copy link
Author

ads69 commented Mar 5, 2020

Daniele,
I have tryed to reproduce it in a very small project with no success unfortunatelly.
I think that some units that I use in a bad way may lead to this, because I have another problem with the swagger (I cannot open it) when MVCFramework.Serializer.JsonDataObjects is in my uses.
I close the issue for the moment and will try to investigate more later.
Thanks again.

@ads69 ads69 closed this as completed Mar 5, 2020
@danieleteti
Copy link
Owner

You are welcome, let me know about your findings.

@ads69
Copy link
Author

ads69 commented Mar 5, 2020

Daniele,
I have found the problem the DatasetToObjet doesn't raise the error (not easy to catch since I was using a service). In fact the Nullable property doesn't take the value, it keep staying in a nill state.
look at the sample
Project1.zip

Hope this help.

@danieleteti
Copy link
Owner

Actually there was an issue, but the sample provided uses the Spring nullables, and not the dmvcframework nullables. In the repo now you can use the fixed version which solve the problem. Also here you can fnd the corrected sample.

Project1.zip

@danieleteti danieleteti added the accepted Issue has been accepted and inserted in a future milestone label Mar 8, 2020
@danieleteti danieleteti added this to the 3.2.0-boron milestone Mar 8, 2020
@ads69
Copy link
Author

ads69 commented Mar 9, 2020

Great ! Thanks Daniele.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Issue has been accepted and inserted in a future milestone
Projects
None yet
Development

No branches or pull requests

2 participants