Wheels save(allowExplicitTimestamps=true)
doesn't produce the expected result
#1113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello there,
I found some confusion in the documentation regarding the usage of
allowExplicitTimestamps
. After looking into wheels source code, it seemsallowExplicitTimestamps
has been wrongly indicated as a parameter for themodel.save()
function while it's missing formodel.new()
(note:model.create()
is properly documented).I've updated their signatures:
allowExplicitTimestamps=true
frommodel.save()
signature as it doesn't produce the effect indicated in the documentation. The following test would show the error:allowExplicitTimestamps = false
to themodel.new()
signature. While this isn't required (it's passed through arguments.properties) I thought it'd be more consistent with the existingmodel.create()
signature.create
andnew
to show how theallowExplicitTimestamps
should be usedmodel.properties.properties.test_nested_property_is_not_returned_when_returnincluded_is_false
to expect the new explicit property from new()model.properties.properties.test_setting_and_getting_properties_with_named_arguments
to expect the new explicit property from new()model.properties.properties.test_setting_and_getting_properties
to expect the new explicit property from new()model.properties.timestamps.test_allowexplicittimestamps_is_not_an_object_property
as it's not relevant anymore now that the property is defaulted.The documentation should also be updated. Specifically the following pages (I'm not sure how to get this done):
allowExplicitTimestamps
should be removed from the list of parametersallowExplicitTimestamps
should be added to the list of parameters