Kartieren Sie ein zusammengesetztes Typattribut direkt und verwenden Sie es in einem Joincolumn in Hibernate

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Kartieren Sie ein zusammengesetztes Typattribut direkt und verwenden Sie es in einem Joincolumn in Hibernate

by Anonymous » 20 Aug 2025, 16:55

Ich habe eine Entität, die einen zusammengesetzten Typ für eine seiner Spalten hat: < /p>

Code: Select all

create type cust_type as (foo varchar, bar varchar);

create table my_table (attr cust_type, ...);

@Struct(name = "cust_type", attributes = {"foo", "bar"})
Class CustType {
String foo;
String bar;
}

Class MyTable {
CustType attr;
}
< /code>
Das funktioniert oben.Class MyTable {
@Column(name = "attr.foo")

Top