|
From IRC:
gmorling emmanuel: if for an embeddable is given an explicit column name via @Column, that's appended to the name of the embbeddable role in the embedding object itself, right? 21:06 gmorling e.g. if there is @Column("zip") within the embeddable, the tuple column should be address.zip 21:07 emmanuel you will need to look at the naming strategy 21:07 emmanuel in ORM it would be zip 21:08 emmanuel not address.zip 21:08
-
-
-
alxs <alxs!~alxs@184.151.111.90> has joined #hibernate-dev 21:08
-
hardy <hardy!~hardy@redhat/jboss/hardy> has quit IRC (Quit: hardy) 21:08
gmorling ah, that's interesting 21:09 gmorling i guess for mongo i'd more expect address.zip 21:09 gmorling i.e. keep it within the sub-document 21:09 gmorling atm. it is pulled out to the outer document 21:09 emmanuel accoring to logicalColumnName.logicalColumnName I would say it would be "zip" 21:09 gmorling do you think thats good for doc stores? 21:10
-
s4ke <s4ke!~s4ke@95.91.239.124> has quit IRC (Quit: Leaving.) 21:12
-
s4ke <s4ke!~s4ke@95.91.239.124> has joined #hibernate-dev 21:12
emmanuel no it does not look too good 21:13 emmanuel esp since we use the fact that a dot separates nested elements 21:14 emmanuel but the problem is there is no JPA option to override a column prefix of an embeddable 21:14 emmanuel if you see what I mean 21:14 emmanuel so the first columns in a dotted representation will always be the property names 21:15 emmanuel and the last column could be the acutal @Column 21:15 gmorling so an @Column on the outer prop would be ignored in this case? 21:17
-
ci-bot-hibernate <ci-bot-hibernate!~ci-bot-hi@ci.hibernate.org> has quit IRC () 21:17
gmorling emmanuel: ^ 21:17 emmanuel yes 21:18 emmanuel logicalColumnName only receives one column and one property name 21:18
-
ci-bot-hibernate <ci-bot-hibernate!~ci-bot-hi@ci.hibernate.org> has joined #hibernate-dev 21:18
gmorling can one give a dot name via @Column? i guess not? 21:19 emmanuel yes I think you can 21:21 emmanuel @column(name="a.b.c") 21:21 emmanuel that's a workaround indeed 21:21 emmanuel which would imply thta we should not prefix @Column by it's outer property names 21:22 emmanuel gmorling: ^ 21:22 gmorling i see 21:22 emmanuel so if you want to keep the structure, you would use the dots 21:22 gmorling it fails only if an embeddable is used in different roles in different entities 21:22 emmanuel and since embedded object are reused sometime, you might need to use @AttributeOverride to override the column on the embedding side 21:23 emmanuel more verbose but doable
|