I want to use @JmixGeneratedValue with schema in the sequence name, but when specifying schema I get an error:
java.lang.IllegalArgumentException: Invalid sequence name: ‘my_schema.my_sequence’. It can contain only alphanumeric characters and underscores
Is there any workaround? I cant create sequence in “default” schema.
Please create an issue here: Issues · jmix-framework/jmix · GitHub
As a workaround, you can define your own implementation of Sequences
interface extended from io.jmix.data.impl.SequencesImpl
and override its checkSequenceName()
method. Something like this:
@SpringBootApplication
public class DemoApplication {
@Primary
@Bean
public Sequences sequences() {
return new SequencesImpl() {
@Override
protected void checkSequenceName(String sequenceName) {
// ...
}
};
}