Dear JOOQ team, please look into this:

Tested with 3.9.2 and 3.9.1. After adding 
'<pojosEqualsAndHashCode>true</pojosEqualsAndHashCode>' faced this:

Error in generated pojo's hashCode method:

    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        result = prime * result + ((applicationId == null) ? 0 : 
applicationId.hashCode());
        result = prime * result + ((ruleEngineModelId == null) ? 0 : 
ruleEngineModelId.hashCode());
        result = prime * result + ((result == null) ? 0 : 
result.hashCode());
*        result = prime * result + ((status == null) ? 0 : 
status.hashCode());*
        result = prime * result + ((creationDate == null) ? 0 : 
creationDate.hashCode());
        return result;
    }



*Generator log:*

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile ***: 
Compilation failure: Compilation failure:
[ERROR] ***/public_/tables/pojos/ApplicationRuleEngineResult.java:[167,43] 
error: incomparable types: int and <null>
[ERROR] ***public_/tables/pojos/ApplicationRuleEngineResult.java:[167,64] 
error: int cannot be dereferenced

*POJO class:*

public class ApplicationRuleEngineResult implements Serializable {

...
    private Long       id;
    private Long       applicationId;
    private Long       ruleEngineModelId;
    private BigDecimal result;
    private String     status;
    private DateTime   creationDate;
...

create table application_rule_engine_result
(
id bigserial primary key,
application_id bigint,
rule_engine_model_id bigint,
result double precision,
status varchar,
creation_date timestamp with time zone
);

There's also a custom Double to BigDecimal converter used by Generator:

public class NumberConverter implements Converter<Double, 
BigDecimal>{...convertion routine...}

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to