From 08bdf319fb801a2e2c71184bd56d86eabb79b457 Mon Sep 17 00:00:00 2001 From: Charlie Mordant Date: Tue, 13 Apr 2021 21:40:34 +0200 Subject: [PATCH] generate cassandra id --- utils/entity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/entity.js b/utils/entity.js index 2a5f294748f..a779b26e8b6 100644 --- a/utils/entity.js +++ b/utils/entity.js @@ -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; @@ -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() {