problem with ExtendedType in Cayenne 4.2
Andrea Biasillo <[email protected]>
| Newsgroups | gmane.comp.java.cayenne.user |
|---|---|
| Message-ID | <pony-eb26d4b97ed24d27e0f8f8afa0aa2a0ef7145fb7-0cf1f3398428ddc8d95ee64899f5986390b5ff72@user.cayenne.apache.org> |
Hi!
We are migrating from 4.0.2 to 4.2. We have a class that implements ExtendedType.
In 4.0.2 the method:
public SourceId materializeObject(ResultSet rs, int index, int type) throws Exception
was invoked, but not in 4.2.
We register our class in this way:
public class DataloyOracleAdapter extends OracleAdapter {
public DataloyOracleAdapter(@Inject RuntimeProperties runtimeProperties,
@Inject(Constants.SERVER_DEFAULT_TYPES_LIST) List<ExtendedType> defaultExtendedTypes,
@Inject(Constants.SERVER_USER_TYPES_LIST) List<ExtendedType> userExtendedTypes,
@Inject(Constants.SERVER_TYPE_FACTORIES_LIST) List<ExtendedTypeFactory> extendedTypeFactories,
@Inject(Constants.SERVER_RESOURCE_LOCATOR) ResourceLocator resourceLocator,
@Inject ValueObjectTypeRegistry valueObjectTypeRegistry) {
super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories, resourceLocator,
valueObjectTypeRegistry);
setSupportsGeneratedKeys(false);
//super.setPkGenerator(new DataloyPkGenerator());
setSupportsBatchUpdates(false);
this.extendedTypes.registerType(new SourceIdType());
}
}
What is wrong? What should be changed?
Many regards,
Andrea