cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan José Gil <mat...@gmail.com>
Subject Registering Extended Types
Date Mon, 17 Sep 2012 00:11:05 GMT
Hi,

I'm trying to use 3.1M3 version and I've noted that my ExtendedType
registrations aren't working anymore.
I've looked at docs, but they don't seem to be update. So I had readed the
unit tests at svn; but I did not understand them :(

Has anynoe already solved this problem?

The errors are:

import org.apache.cayenne.BaseContext;
import org.apache.cayenne.ObjectContext;
import org.apache.cayenne.access.DataContext;
import org.apache.cayenne.access.DataDomain;
import org.apache.cayenne.access.DataNode;
import org.apache.cayenne.conf.Configuration;

...

  @Before public void setupCayenne() {
    final DataDomain domain =
Configuration.getSharedConfiguration().getDomain(); // <-- it does not know
"Configuration"
    for (final DataNode node : domain.getDataNodes()) {

node.getAdapter().getExtendedTypes().registerType(DateTimeType.INSTANCE);

node.getAdapter().getExtendedTypes().registerType(LocalDateType.INSTANCE);

node.getAdapter().getExtendedTypes().registerType(LocalDateTimeType.INSTANCE);

node.getAdapter().getExtendedTypes().registerType(LocalTimeType.INSTANCE);
    }

    final ObjectContext context = DataContext.createDataContext(); // <--
this method doesn't exists anymore
    BaseContext.bindThreadObjectContext(context);
  }

is there a sample I could reach?

Best Regards
Juanjo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message