Skip to content

Fix for @Column on timestamp defined as timestamp(255)#3740

Merged
rbygrave merged 1 commit intomasterfrom
feature/hdatabase-timestamp-255
Apr 9, 2026
Merged

Fix for @Column on timestamp defined as timestamp(255)#3740
rbygrave merged 1 commit intomasterfrom
feature/hdatabase-timestamp-255

Conversation

@rbygrave
Copy link
Copy Markdown
Member

@rbygrave rbygrave commented Apr 9, 2026

As per #3720

  @Column
  ZonedDateTime zonedDateTime2;

... resulting in DDL generated as timestamp(255).

This is occurring when the JPA dependency is used like: jakarta.persistence:jakarta.persistence-api:3.2.0 rather than using the transitive dependency that ebean includes.

Workaround:

Remove the jakarta.persistence:jakarta.persistence-api:3.2.0 dependency.

Fix:

The fix here is to use a timestamp type that has a maximum precision. When a precision/length is specified greater than the maximum precision then the fallback type is used which is timestamp without any precision.

As per #3720

```
  @column
  ZonedDateTime zonedDateTime2;
```
... resulting in DDL generated as `timestamp(255)`. This is
occurring when the JPA dependency is used like:
jakarta.persistence:jakarta.persistence-api:3.2.0
rather than using the transitive dependency that ebean includes.

Workaround:
Remove the jakarta.persistence:jakarta.persistence-api:3.2.0 dependency.

Fix:
The fix here is to use a timestamp type that has a maximum precision.
When a precision/length is specified greater than the maximum precision
then the fallback type is used which is `timestamp` without any precision.
@rbygrave rbygrave added this to the 16.4.0 milestone Apr 9, 2026
@rbygrave rbygrave self-assigned this Apr 9, 2026
@rbygrave rbygrave merged commit 6e9d0a9 into master Apr 9, 2026
1 check passed
@rbygrave rbygrave deleted the feature/hdatabase-timestamp-255 branch April 9, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant