Skip to content

this really a question and try finger if this possible get from a cache model the document ref so i can use at for what ever #10

@Sivanwol

Description

@Sivanwol

i got a model that i use this package
as follow

`
export interface ILocationsModel extends IBaseModel {
lat: number;
long: number;
title: string;
asset_small_image?: string;
subtitle: string;
entity?: DocumentReference<FirebaseFirestore.DocumentData>;
address: string;
owner: DocumentReference<FirebaseFirestore.DocumentData>;
}

export class LocationsModel extends BaseModel {
@IsLatitude()
@IsNumber()
public lat: number;
@IsLongitude()
@IsNumber()
public long: number;
@IsString()
public title: string;
@IsString()
public asset_small_image?: string;
@IsString()
public subtitle: string;
@isObject()
public entity?: DocumentReference<FirebaseFirestore.DocumentData>;
@IsString()
public address: string;
@isObject()
public owner: DocumentReference<FirebaseFirestore.DocumentData>;

constructor(params: ILocationsModel, validate: boolean = true) {
    super(params);
    this.address = params.address;
    this.asset_small_image = params.asset_small_image;
    this.entity = params.entity;
    this.lat = params.lat;
    this.long = params.long;
    this.title = params.title;
    this.subtitle = params.subtitle;
    this.owner = params.owner;

    if (validate) {
        this.validate();
    }
}

}
`

now i try to get the document ref that i need for return as response for a service is there a way fetching the document ref i save at later of db for i don't want duplicates of same data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions