Can DataObjects.NET support SQL authentication columns?

Despite the fact that DataObjects.NET has a lot of interesting things, I found the help resources scarce and cannot find an example of using DataObjects.NET with primary keys generated by RDBMS. It would seem that D4O will not do insertions against SQL Server if it does not manage the key.

Has anyone decided this in the wild?

0
source share
1 answer

There is no easy way to make DO4 use IDENTITY columns - mainly because it is designed to support bulk key generation (the so-called HiLo algorithm).

AFAIK, there are no good workarounds. For instance. DO4 supports specialized key generators, but it is rather difficult to develop an approach based on the IDENTITY column. In fact, it has to insert fake entries into packages and delete them further (or roll back the transaction) to work. Given that there may be columns with unique constraints, the task becomes quite complex.

We will think about implementing this in the future.

+2
source

Source: https://habr.com/ru/post/1306569/


All Articles