Skip to content

Commit

Permalink
generate cassandra id
Browse files Browse the repository at this point in the history
  • Loading branch information
Tcharl committed Apr 13, 2021
1 parent 8e5acba commit 08bdf31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const { MapperTypes } = require('../jdl/jhipster/entity-options');
const { OAUTH2 } = require('../jdl/jhipster/authentication-types');
const { CommonDBTypes } = require('../jdl/jhipster/field-types');

const { BOOLEAN } = CommonDBTypes;
const { BOOLEAN, LONG } = CommonDBTypes;
const { MAPSTRUCT } = MapperTypes;
const { PAGINATION, INFINITE_SCROLL } = PaginationTypes;
const NO_PAGINATION = PaginationTypes.NO;
Expand Down Expand Up @@ -368,7 +368,7 @@ function prepareEntityPrimaryKeyForTemplates(entityWithConfig, generator, enable
return [...this.ownFields, ...this.derivedFields];
},
get autoGenerate() {
return this.composite ? false : this.fields[0].autoGenerate;
return this.composite || primaryKeyType === LONG ? false : this.fields[0].autoGenerate;
},
// Fields inherited from id relationships.
get derivedFields() {
Expand Down

0 comments on commit 08bdf31

Please sign in to comment.