I wish we could decouple a choice of PK generation strategy from the adapter. 
(I even think we have a task for this somewhere). Otherwise whatever we do with 
this PR is going to be an issue for someone... E.g. if we keep the old one as 
the default (which sounds sensible), then SQLServer2012Adapter will not be 
auto-detected and will have to be installed explicitly.

I am leaning to the above solution, with an eye on future refactoring the 
adapter for easy PkGenerator pluggability.

Andrus



> On Mar 6, 2018, at 2:52 AM, Nikita Timofeev <ntimof...@objectstyle.com> wrote:
> 
> Hi all,
> 
> Need your advice. We have PR[1] that offers PK generator for SQL
> Server, based on sequences with optional usage of NEWID() function for
> char PKs.
> The catch is that min version of SQLServer that supports this is 2012.
> 
> So my question is: can we upgrade default cayenne support to that
> version and create some SQLServerLegacyAdapter, or new one better be
> moved to some SQLServer2012Adapter while keeping current version as
> default? Or maybe we can just switch to new version without keeping
> legacy support?
> 
> [1] https://github.com/apache/cayenne/pull/277
> 
> -- 
> Best regards,
> Nikita Timofeev

Reply via email to