-
-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
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
ENH: Support different ColumnDefinition for different database platforms #2559
Comments
I tried to implement the new annotation, but it would be a huge modification. The xmls of the column definitions had to be also modified (list of platform-columnDefinition pairs) and lot of code in ebean. We designed a new proposed solution which has only small code changes in ebean but it "redefines" the usage of Example: @Column(columnDefinition = "db2;blob(64M);sqlserver,h2;varchar(227);varchar(127)")
String description; Using the pattern @Column(columnDefinition = "PLATFORM1;DEFINITION1;PLATFORM2,PLATFORM3;DEFINITON2;DEFINITON-DEFAULT") We use semicolon as separator because it's very unlikely that it would be used for column definition. You can check the ebean code change here: FOCONIS@3d83c6b What do you think about this? |
I like it - nice approach !! |
Thank you! I opened a PR for it: #2563 |
Closing with the merged PR. Nice work !! |
Hi @rbygrave ,
with db2 we have the problem, we define columns as
blob
(without length):Java Code:
generated init migration:
In this case we can only save a file that is not bigger as 1 MB (default size of db2 blob).
We would like to define the columnDefinition for a field more precise: different length for different platforms.
We would like to create a new annotation (e.g. DbColumn?) which uses the
javax.persistence.@Column
as a base and can be defined for every platform different:What do you think about it?
The text was updated successfully, but these errors were encountered: