1
votes

For example,

@Column("body")
private String body;

That will create a column "body"

I'd want to be able to annotate such that I can create a composite column such as "body:foo".

There isn't any example for this purpose or even any indication that this is possible. Does anyone have any more knowledge about this?

1

1 Answers

0
votes

I'm not entirely sure that this will work with the entity persister, but I would maybe play around with something like:

@Column()
@Serializer(MyCompositeSerializer.class)
private SomeEntity entity;

public class MyCompositeSerializer extends AnnotatedCompositeSerializer<SomeEntity> {
    public MyCompositeSerializer() {
        super(SomeEntity.class);
    }
}

Take a look at how public class AnnotatedCompositeSerializer<T> extends AbstractSerializer<T> is implemented to get a feel for what you need to do if the above approach doesn't work.