Hi @hilagut @fabien @Schoonology , Loopack team,
The code is converting Json object string. We debugged and found the issue with Cassandra.prototype.create function in loopback-connector-cassandra/lib/cassandra.js. Please provide the solution for the issue.
model class
import {Entity, model, property} from '@loopback/repository';
@model()
export class Address {
@property({
type: 'string'
})
street: string;
Hi @nishankpathak, this repository is for LoopBack 3. Please create an issue or GitHub Discussion in https://github.com/loopbackio/loopback-next for LoopBack 4-related matters.
Hi @hilagut @fabien @Schoonology , Loopack team, The code is converting Json object string. We debugged and found the issue with Cassandra.prototype.create function in loopback-connector-cassandra/lib/cassandra.js. Please provide the solution for the issue.
model class import {Entity, model, property} from '@loopback/repository'; @model() export class Address { @property({ type: 'string' }) street: string;
@property({ type: 'string' }) city: string;
@property({ type: 'string' }) state_or_province: string;
@property({ type: 'string' }) postal_code: string;
@property({ type: 'string' }) country: string; } @model({name: 'hotels'}) export class Hotels extends Entity { @property({ type: 'string', id: true, }) id?: string;
@property({ type: 'string', required: true, }) name: string;
@property({ type: 'string', required: true, }) phone: string;
@property({ type: 'Object', required: true }) address: Address;
@property({ type: 'array', itemType: 'string' }) pois: string[];
// Define well-known properties here
// Indexer property to allow additional data // eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(data?: Partial) {
super(data);
}
}
export interface HotelsRelations { // describe navigational properties here }
export type HotelsWithRelations = Hotels & HotelsRelations;