Database ORM platform service
How to use it ?
import { Entity, Column } from "../../../core/platform/services/database/services/orm/decorators";
@Entity("my_entity", {
primaryKey: [["company_id"], "id"], //Primary key, see Cassandra documentation for more details
type: "my_entity",
})
export class MyEntity {
@Type(() => String)
@Column("company_id", "uuid", { generator: "uuid" })
company_id: string;
@Column("workspace_id", { generator: "uuid" })
id: string;
@Column("text", "encoded")
text: string;
}FAQ
I set a column to a type but I get an other type on code. Why for two identical definitions it created fields of different types?
Last updated