Skip to content

Commit

Permalink
Merge pull request #525 from pkokorev/master
Browse files Browse the repository at this point in the history
[Issue #524] Changed constructor usage
  • Loading branch information
cowtowncoder committed Aug 20, 2014
2 parents e88a87c + e5422d2 commit ee57613
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ObjectIdInfo
{
protected final PropertyName _propertyName;
protected final Class<? extends ObjectIdGenerator<?>> _generator;
private final Class<? extends ObjectIdResolver> _resolver;
protected final Class<? extends ObjectIdResolver> _resolver;
protected final Class<?> _scope;
protected final boolean _alwaysAsId;

Expand Down Expand Up @@ -60,7 +60,7 @@ public ObjectIdInfo withAlwaysAsId(boolean state) {
if (_alwaysAsId == state) {
return this;
}
return new ObjectIdInfo(_propertyName, _scope, _generator, state);
return new ObjectIdInfo(_propertyName, _scope, _generator, state, _resolver);
}

public PropertyName getPropertyName() { return _propertyName; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKey;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import com.fasterxml.jackson.annotation.ObjectIdResolver;
Expand Down Expand Up @@ -140,6 +141,7 @@ static class CustomResolutionWrapper {
}

@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id", resolver = PoolResolver.class)
@JsonIdentityReference(alwaysAsId = true) // #524
static class WithCustomResolution {
public int id;
public int data;
Expand Down

0 comments on commit ee57613

Please sign in to comment.