ORM: Both UUID and Identity keys at the same time... no luck
I want a database table to have both UUID and numeric incremental keys.
In the persistent component sites.cfc, I can have this:
property name="siteNumId" fieldtype="id" generator="native" type="numeric" ormtype="integer";
...which works great. Also, I can have this instead:
property name="userId" fieldtype="id" generator="assigned" ormtype="string" length="36";
...which works great too (I'm setting the uuids myself).
If I try to use them both at the same time, the ORM builds the database fine, but when trying to insert new objects to the table, the incremental column tries to insert null value, which naturally raises an exception.
So, I can have either auto- or manually generated UUIDs, - or - Incremental numeric IDs. But not both. ![]()
So, if anyone knows a neat trick how to go around this issue, that'd be nice...
My database is MSSQL, and I'm very new to the ORM/Hibernate thingie. Any tips appreciated!
