You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Nikita Timofeev <nt...@objectstyle.com> on 2018/03/06 07:52:48 UTC

Minimum version of SQL Server

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

Re: Minimum version of SQL Server

Posted by Michael Gentry <bl...@gmail.com>.
Pluggable is definitely better.  A friend kept having to jump through a few
hoops to use his own PK generator with various adapters in the past.


On Tue, Mar 6, 2018 at 11:53 AM, Andrus Adamchik <an...@objectstyle.org>
wrote:

> 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 <nt...@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
>
>

Re: Minimum version of SQL Server

Posted by Andrus Adamchik <an...@objectstyle.org>.
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 <nt...@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