We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate dictionary table for Enum.
Motivation: for the correctness of the scheme, especially useful for other systems that will also work with the database
enum class AccountType { DEBIT, CREDIT } object Accounts : Table() { val type = enumeration("type", AccountType::class) }
We get in the database:
CREATE TABLE ACCOUNT_TYPE(ID INT, NAME VARCHAR); ALTER TABLE ACCOUNT ADD CONSTRAINT FX_ACCOUNT_ACCOUNT_TYPE_ID FOREIGN KEY (TYPE) REFERENCES ACCOUNT_TYPE(ID); INSERT INTO ACCOUNT_TYPE(ID, NAME) VALUES (1, 'DEBIT'); INSERT INTO ACCOUNT_TYPE(ID, NAME) VALUES (2, 'CREDIT');
make optional
The text was updated successfully, but these errors were encountered:
it is possible to add a similar function to SchemeUtils, who needs to call
SchemeUtils
Sorry, something went wrong.
add a special annotation @GenerateEnumTable (tentative name), which will tell SchemeUtils to generate or update the table data for this enum.
@GenerateEnumTable
Should it be resolved/linked with columns by id/enum ordinal or by enum value?
It is hard to say. I think to use ordinal, but still give the user the opportunity to specify the values from the enum class
No branches or pull requests
Generate dictionary table for Enum.
Motivation: for the correctness of the scheme, especially useful for other systems that will also work with the database
We get in the database:
make optional
The text was updated successfully, but these errors were encountered: