My code was working on 4.0.M5, but I ca not figure out how to make it work on 
B2, I think the problem is that I am not installing my DbAdapterDetector 

package com.ace.dba;

import static 

import org.apache.cayenne.configuration.server.DbAdapterDetector;
import org.apache.cayenne.dba.postgres.PostgresSniffer;
import org.apache.cayenne.di.Binder;
import org.apache.cayenne.di.Module;

public class PcExpressPosModule implements Module {

    public void configure(Binder binder) {
PcExpressPosPgDetector.class );  //tryes param in reverse order nothing

My PcExpressPosPgDetector:

public class PcExpressPosPgDetector extends PostgresSniffer {
    public PcExpressPosPgDetector(@Inject AdhocObjectFactory objectFactory) {

    public DbAdapter createAdapter(DatabaseMetaData md) throws SQLException {
        PostgresAdapter db = (PostgresAdapter) super.createAdapter(md);
        db.setPkGenerator(new PcExpressPosUUIDPkGenerator(db));
        return db;    
PcExpressPosUUIDPkGenerator detects pk columns of type UUID and generates a 
uuid for then,.. thats all.

Atte. Juan Manuel Díaz Lara

Reply via email to