cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] [Closed] (CAY-2116) Split schema synchronization code in a separate module
Date Thu, 29 Sep 2016 17:53:20 GMT


Andrus Adamchik closed CAY-2116.
       Resolution: Fixed
    Fix Version/s: 4.0.M4

> Split schema synchronization code in a separate module 
> -------------------------------------------------------
>                 Key: CAY-2116
>                 URL:
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 4.0.M4
> There are no real reasons why classes like DbLoader , merge package, and DbGenerator
are a part of Cayenne core. There are a few technical reason - these classes depend on customizations
coming from DbAdapter, or are used by other cayenne-server classes.
> This is an attempt to split them to a separate module (cayenne-dbsync), preserving all
adapter customizations (specifically for MergerFactory). I was able to do that by implementing
a special explicit "PerAdapterProvider" class that uses adapter class name as a key to DI-bound
map of factory implementations. As a result we'll have cleaner separation of concerns and
can focus on "cayenne-dbsync" for DB reverse and forward engineering tasks instead of trying
to find relevant classes and tests all over the place.
> Migrating DbGenerator, while a sensible thing to do, is currently blocked by the fact
that it is used in 'org.apache.cayenne.access.dbsync' classes for updating DB schema on startup.
I think we need to move all these classes to "cayenne-dbsync" as well (making schema sync
an optional function conditional on cayenne-dbsync inclusion), and stop supporting Schema
Update Strategy in the Modeler (and perhaps even at the DataNode level). This warrants a separate
> This is a breaking change. Many classes from o.a.c.merge, o.a.c.access.loader, o.a.c.access
are moved from cayenne-server, and placed in a different package namespace (org.apache.cayenne.dbsync
and subpackages). 

This message was sent by Atlassian JIRA

View raw message