Retiring @Table #5359
Replies: 4 comments 5 replies
-
Sounds like a good idea. I guess I'd prefer calling it |
Beta Was this translation helpful? Give feedback.
-
Curiously, I've cleaned up the zombie code and deprecated this member. |
Beta Was this translation helpful? Give feedback.
-
Upon reflection, I don't want to add a big "container" annotation, so I would rather split this stuff out into smaller annotations. I'm going to begin by adding |
Beta Was this translation helpful? Give feedback.
-
Seems to have been completed already as part of https://hibernate.atlassian.net/browse/HHH-15570, so I'll close this discussion. |
Beta Was this translation helpful? Give feedback.
-
The
@Table
annotation has been sort of semi-deprecated for a long time now, but it has a zombie second life as a way to specify certain things for secondary tables.I would really like to fully-deprecate this thing, and eventually remove it, but I'm having trouble coming up with something elegant to replace it with.
Currently, its useful bits are:
checkConstraint
andcomment
fetch
,inverse
, andoptional
sqlInsert
,sqlUpdate
, andsqlDelete
and they're all only needed for secondary tables.
Now, I'm hoping to see JPA add
check
andcomment
directly to the JPA@Table
and@SecondaryTable
annotations but obviously that will take a while.But the other things don't make sense for the standard.
Honestly the best thing I've come up with so far is to simply move these things to an
@Secondary
annotation:but this really isn't all that different from
@Table
as it exists today. (Though the name is a lot better.)Beta Was this translation helpful? Give feedback.
All reactions