cuba-platform / cuba-gradle-plugin

Gradle plugin for building CUBA platform and applications
https://www.cuba-platform.com
Apache License 2.0
15 stars 18 forks source link

Entities are not enhanced if there is no metadata.xml file in the project #75

Closed gorbunkov closed 5 years ago

gorbunkov commented 5 years ago

Sometimes a separate set of persistent entities is required for testing. If I have entities for tests, say, in the "core" module, then such entities won't be enhanced if I don't create a test-metadata.xml for the core tests. However, only persistence.xml should be required.

See the project attached.

selection_006

Test project

enhancing-bug.zip

QA

To check that entities are enhanced you can:

  1. write a test that loads/saves entity from test model to DB
  2. check *.class files that are located in "/modules/core/build/classes/java/test/path/to/model/package/"
gorbunkov commented 5 years ago

enhancing-bug.zip

see the SampleIntegrationTest.testLoadTestEntity() method