> Are there any drawbacks for using faked sequences like this?

None that I can think of... AFAIK Cach� doesn't provide a built-in facility
(at the class level) to do this. It does increment its own internal ID
however, and I bet the code is quite similar to what you've done.

By your approach it would seem interesting if you created a generic
"nextVal(field)" method receiving the field name as an argument. This way
you only have to memorize one classname/methodname pair.

But of course, you have to be *very* careful with the ^Sequences global!
Make sure everyone who ever touches that system knows that this global is
crucial to your application and must not be messed with. Otherwise results
may end up being quite nasty...

HTH,

Ram�n



Reply via email to