Thank you for creating this package!
Reproduction
I created a simple model but the .belongsToMany gives me the error Property 'belongsToMany' does not exist on type 'typeof ...
Steps to reproduce the behavior
- Install piniaorm
- Create a model (group.ts)
import { Model } from "pinia-orm";
import GroupMember from "./GroupMember";
import Member from "./Member";
export default class Group extends Model {
static entity = "Group";
static fields() {
return {
id: this.uid(),
title: this.string(""),
description: this.string(""),
members: this.belongsToMany(Member, GroupMember, "group_id", "member_id"),
};
}
}
- See that your editor (Webstorm in my case) says that belongsToMany does not exist.
Expected behavior
I would expect this.belongsToMany to exist and behave just like the original docs described it. https://vuex-orm.org/guide/model/relationships.html#many-to-many
Actual behavior
It says belongsToMany does not exist.
Additional information
If you didn't implement belongsToMany it might be good to put this in the README.md
Thank you for creating this package!
Reproduction
I created a simple model but the .belongsToMany gives me the error
Property 'belongsToMany' does not exist on type 'typeof ...Steps to reproduce the behavior
Expected behavior
I would expect this.belongsToMany to exist and behave just like the original docs described it. https://vuex-orm.org/guide/model/relationships.html#many-to-many
Actual behavior
It says belongsToMany does not exist.
Additional information
If you didn't implement belongsToMany it might be good to put this in the README.md