Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cassandra UDT not being persisted in cassandra database #4354

Open
nishankpathak opened this issue Feb 16, 2022 · 1 comment
Open

Cassandra UDT not being persisted in cassandra database #4354

nishankpathak opened this issue Feb 16, 2022 · 1 comment

Comments

@nishankpathak
Copy link

nishankpathak commented Feb 16, 2022

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
[prop: string]: any;

constructor(data?: Partial) {
super(data);
}
}

export interface HotelsRelations {
// describe navigational properties here
}

export type HotelsWithRelations = Hotels & HotelsRelations;

@achrinza
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants