Because CocoBase Enterprise is typically used with large scale databases (such as Oracle, DB2, Sybase) which all have built in sequence support that can be leveraged, the 'focus' of the identity management is based on allowing you to specify mapping that uses those features.
CocoAdmin mapping supports database sequences, stored procedures which generate sequences, or even using 'table' based sequences. You can even produce a 'plugin' to CocoAdmin that will automatically 'adjust' your maps when you create new ones and modify your mapping meta data based on your own naming conventions or hooks to specify which columns are identity columns. You can also 'manually' adjust maps to specify which ones are identity/sequence columns on a per class basis using CocoAdmin.
Which database do you wish to use CocoBase against, and which sequence type do you wish to use (database, procedure or table)?
Note, that the runtime plugin architecture also supports plugging in any custom sequence generator you wish to use...
Our best guess is that you'll probably create a sequence table and use the CS_TABLE syntax to support this. If you need a sample map and sample table construct to demonstrate this, just email support@thoughtinc.com and we can email you a prototype you can import. If you let us know which database type you'll be using, they can send you better instructions for what the easiest options for your specific environment are.
Chapter 9 of the programmers guide also walks through the use of Sequence/Identity map settings. And don't forget that the CBFacade needs a cocosource.autoidentity=true property definition in your CBFacade connection properties. This tells CocoBase that you are using maps that contain sequence/identity columns, and that the process of inserting will automatically modify your business objects.
Hope that helps!
THOUGHT Support
|