Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1988

ServerRuntimeBuilder: synthetic DataNode does not have domain's DataMaps linked

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0.M2
    • 4.0.M3
    • Core Library
    • None

    Description

      A project consisting of a single DataMap with no mapped DataNodes is loaded as follows:

      return new ServerRuntimeBuilder()
      .addModule(binder -> binder.bind(SchemaUpdateStrategy.class).to(CreateIfNoSchemaStrategy.class))
      .jdbcDriver(driver).url(url).addConfig("cayenne-project.xml").build();

      When CreateIfNoSchemaStrategy is invoked on startup, it generates exactly zero tables. When digging deeper I noticed this is caused by SyntheticNodeDataDomainProvider failing tolink any DataMaps to the "synthetic" DataNode from the parent domain. So CreateIfNoSchemaStrategy has nothing to work with.

      The workaround is probably to create a dummy DataNode in the project. But it is not very clean.

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: