You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2016/09/29 17:53:20 UTC

[jira] [Closed] (CAY-2116) Split schema synchronization code in a separate module

     [ https://issues.apache.org/jira/browse/CAY-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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: https://issues.apache.org/jira/browse/CAY-2116
>             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.
> TODO:
> 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 Jira.
> UPGRADE NOTES
> 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
(v6.3.4#6332)