for example, there is a table:
table product (id UUID, name varchar)
Is it possible to generate for this table classes like code bellow?
class ProductIdentifier {
UUID id;
}
class Product {
ProductIdentifier id;
String name;
}
I'm just asking. I didn't try
Yes, the feature is called "embedded keys", where the code generator automatically generates an embeddable type (single column or composite, it doesn't matter) for both:
Of course, you can also do this manually, yourself, by declaring embeddable types for each key.