[hibernate-dev] Naming and "naming strategies"
Emmanuel Bernard
emmanuel at hibernate.org
Mon Feb 2 09:34:32 EST 2015
I think you’re missing things like @MapKeyColumn, @OrderColumn
Also, you might think about embedded objects. I think today the implicit contract received the qualified property names separated by dots e.g. “homeAddress.street”. should that continue as it is or is there a need for abstraction?
Emmanuel
> On 31 Jan 2015, at 03:33, Steve Ebersole <steve at hibernate.org> wrote:
>
> So here is what I have for implicit naming strategy, in simplified form:
>
> Table naming
> Entity primary table - @Table
> Join table - @JoinTable
> Collection table - @CollectionTable
> <secondary table are required to be explicitly named>
> Column naming
> basic attribute column
> entity discriminator column
> tenant id column
> @Any discriminator column
> @Any key column
> @JoinColumn
> @PrimaryKeyJoinColumn
> Especially as far as column naming goes, can anyone see any I am missing?
>
>
> On Fri, Jan 23, 2015 at 10:43 AM, Steve Ebersole <steve at hibernate.org <mailto:steve at hibernate.org>> wrote:
> Thanks Max for validating I am not going insane... at least in regards to this :)
>
> On Fri, Jan 23, 2015 at 10:19 AM, Max Rydahl Andersen <manderse at redhat.com <mailto:manderse at redhat.com>> wrote:
> On 23 Jan 2015, at 14:18, Steve Ebersole wrote:
>
> [1] - I vaguely recall seeing that certain databases allow different length
> constraints for different types of identifiers (table name, versus column
> name, versus constrain name, ...). Can anyone confirm that?
>
> I remember db2 have this fun.
>
> http://bytes.com/topic/db2/answers/183320-maximum-length-table-names-colums-etc <http://bytes.com/topic/db2/answers/183320-maximum-length-table-names-colums-etc>
>
> I believe Oracle has too but couldn't find evidence for it.
>
> /max
> http://about.me/maxandersen <http://about.me/maxandersen>
>
>
More information about the hibernate-dev
mailing list