ExportXMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.0.0
    • Affects Version/s: None
    • Component/s: Model
    • None
    • 1
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Problem

      The '.' ban added by HIBERNATE-255 checks the schema on each namespace, which covers the schema attribute of @Table. It does not cover the hibernate.default_schema configuration property: Hibernate applies that setting at SQL-render time through SqlStringGenerationContext (see AbstractEntityPersister.determineTableName), so it never appears in namespace metadata at boot.

      The ambiguity HIBERNATE-255 closed is therefore reachable through the property path: hibernate.default_schema = "a.b" with @Table(name = "c") resolves to the same collection as @Table(schema = "a.b", name = "c"), and the attribute form is rejected at boot while the property form boots silently.

      Proposal

      In MongoAdditionalMappingContributor, read AvailableSettings.DEFAULT_SCHEMA from the ConfigurationService and forbid a '.' in the value, reusing forbidDot with kind "schema" so the message matches the attribute-path check. forbidCatalog already reads hibernate.default_catalog from the same service, so the two qualifier properties end up checked the same way.

            Assignee:
            Jeffrey Yemin
            Reporter:
            Jeffrey Yemin
            Andre Masella
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: