autoincrement primary key
Posted: Fri Dec 16, 2016 9:49 am
When I design database table outside of LANSA, I always use a primary key that’s an integer, which is set to autoincrement, generated automatically by the database.
However, I can’t seem to be able to that with LANSA.
I went through the examples and it seems that most of the examples use a primary key that is part of the domain model (e.g. employee number, department code). Also – I noticed there RRN, but that can’t be made into a primary key.
So – is there a “proper” way of setting up an auto-generating, auto-increment primary key, in LANSA-defined tables?
I know that we can of course generate the value ourselves from the server module e.g., but that just does not feel right). Is there a way to do that at the IO Module level?
However, I can’t seem to be able to that with LANSA.
I went through the examples and it seems that most of the examples use a primary key that is part of the domain model (e.g. employee number, department code). Also – I noticed there RRN, but that can’t be made into a primary key.
So – is there a “proper” way of setting up an auto-generating, auto-increment primary key, in LANSA-defined tables?
I know that we can of course generate the value ourselves from the server module e.g., but that just does not feel right). Is there a way to do that at the IO Module level?