Using multiple schemas with same name sequences but different parameters. I use a default schema name, but the sequence information extractor retrieves all sequences and database information is initialized with sequences devoid of schema name in the order received from the extractor. So if the result is a sequence from default schema followed by the same sequence from another schema, it will be overwritten with invalid information from another schema.
Extractor uses [select * from information_schema.sequences|https://github.com/hibernate/hibernate-orm/blob/604b594226355dc789586c40f1eee241aca259b5/hibernate-core/src/main/java/org/hibernate/dialect/PostgreSQL81Dialect.java#L245-L247] to get all sequences disregarding any default schema configuration.
Then, DatabaseInformationImpl _DatabaseInformationImpl . java java_ populates sequenceInformationMap _sequenceInformationMap_ in order received from executing the above sql, removing schema qualifier and overwriting without any check. [source|https://github.com/hibernate/hibernate-orm/blob/604b594226355dc789586c40f1eee241aca259b5/hibernate-core/src/main/java/org/hibernate/tool/schema/extract/internal/DatabaseInformationImpl.java#L62-L78] |
|