FasterXML / jackson-annotations

Core annotations (annotations that only depend on jackson-core) for Jackson data processor
https://github.com/FasterXML/jackson
Apache License 2.0
1.03k stars 330 forks source link

Add the createItem method to ObjectIdResolver #52

Closed MarSik closed 8 years ago

MarSik commented 9 years ago

This method allows the deserializer to attempt resolving of the missing forward reference by creating and binding a new object.

It should be applied together with my other pull request for the databind subproject and those two together should solve databind's issue #670.

cowtowncoder commented 9 years ago

Ok, this could be doable, but I think name of the method needs some work, to indicate that it is called as a sort of fallback, and handling unresolved reference. And not for general object instantiation or such. I'll think about this a bit more.

On scheduling, this can only go in 2.6, as it is API change.

MarSik commented 9 years ago

Ok, this could be doable, but I think name of the method needs some work, to indicate that it is called as a sort of fallback, and handling unresolved reference. And not for general object instantiation or such. I'll think about this a bit more.

Sure, I suppose it should get a test as well. I just kind of improvised as I need this functionality to support both nested and id based relationships in my project.

On scheduling, this can only go in 2.6, as it is API change.

It is compatible with 2.4 though. But I understand.

Regards

Martin

cowtowncoder commented 9 years ago

I can do the renaming part, figure out what to call it etc.

On versioning: yes, addition would not break anything, but it would break requirement that patch versions are fully backwards-/forwards-compatible (i.e. can not replace 2.5.x with any other patch). And in specific case of annotations, we'll make no changes for patches (ideally I'd only release 2.5, no patches, but users prefer full set). Anyway, it'll slow things a bit here, but I hope to get 2.6 out faster than 2.5.

cowtowncoder commented 8 years ago

Is this still desired? Next version that it would qualify inclusion in would be 2.8.

cowtowncoder commented 8 years ago

Assuming this is not needed, or if needed would need to be modified/changed, closing for now; may be opened if still relevant (although may make sense to do new PR if there are many changes).

MarSik commented 8 years ago

This patch is not needed anymore as the equivalent functionality was included to databind 2.7.