Composite key generates code with missing import

I am just starting to use CUBA.platform and am playing around with reverse-engineering a database that I have here from an old project that was upsized from Access to SQL Server.

With some minor issues (the Access database had very poor design, and parts of that came along to SQL Server), I am able to generate a data model with screens and such…VERY nice.

There is a problem compiling, however, since two of the tables have composite primary keys. CUBA Studio generates appropriate TablenameCompKey classes in the com.company.dbname.entity.key package that extends EmbeddableEntity. So far, so good…here’s the problem:

Every reference to Objects…
there are three in my use case - one for
public int hashCode() { return Objects.hash(keyColumn1, keyColumn2)

and one for each of the key columns testing equality in
public boolean equals(Object o)

return Objects.equals(this.keyColumn1, entity.keyColumn1) &&
Objects.equals(this.keyColumn2, entity.keyColumn2)

…is undefined since the generated code does not have an

import java.utils.Objects;

statement. Adding that statement allows the code to compile and run.

I’ve been developing in various languages for a LONG time, but am a relative newb with Java, so forgive me if I’ve done something stupid and I’m missing the point.

Running latest CUBA Studio plugin (12.3-191) in latest Intellij IDEA CE (2019.3.1) on macOS Mojave 10.14.6.

Scott

Hi, @scottstillwell!
Thanks for the bug report. We will fix it in the next release.
See: https://youtrack.cuba-platform.com/issue/STUDIO-7572

Worth noting…I deleted that project and started over and those same classes were generated but this time included the proper import. I can’t tell why it didn’t do it the first time.