Open
Description
Hi,
I was upgrading to the latest release but I get an error in the generated code. It is related to how the variables are named in the generated models since it generated an error variable for the unique constraints which seems to follow the naming pattern <TableName>Errors
.
But if you actually have a table, called device_errors
it will also translate to DeviceErrors
.
Here is a minimal example:
CREATE TABLE devices (
id UUID,
id2 UUID,
PRIMARY KEY (id)
);
CREATE TABLE device_errors (
id UUID,
PRIMARY KEY (id)
);
ALTER TABLE devices ADD CONSTRAINT unique_devices UNIQUE (id, id2);
The generated code cannot compile since DeviceErrors
will be defined multiple times.
Btw, I am really enjoying bob. Thanks for your work!