The NumericIdGenerator class (version from Cabana) just uses the SQL statement:
Select NextId from NextId where Name='GLOBAL'
This seems like Ids are allocated globally rather than being specific for each table. This means every Id is unique and won't be used as an Id in any other table. Does this seem inefficient to anyone? This limits the total number of records of all tables to the number limit of that field.
I planned to use SQL Server SmallInt for some Id fields to save space, but this would then severely limit my database total number of database records in all tables to only a maximum of 32767 rows, i.e. if one table had 32700 records in it, then all the other tables could only have a combined total of 67 rows.
Does anyone have a smarter version of this class that allows Ids to be allocated by tablename to get around this?