You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to configure a relation that is the same model type to use a different resource url when using it as a relation. e.g. With the model below I want to the relationship url to be /api/paddocks/{paddock_id}/prior_paddocks/sync however the SDK attempting to use /api/paddocks/{paddock_id}/paddocks/sync
export default class Paddock extends Model<{
id: number
...
},
DefaultPersistedAttributes > {
public $resource (): string {
return 'paddocks'
}
...
public prior_paddocks (): BelongsToMany {
return new BelongsToMany(Paddock, this)
}
...}
The text was updated successfully, but these errors were encountered:
No, currently there is no way to customize the relation resource url. I will leave the issue open to see, if someone can pickup and make a PR for this. I may look into it once I have time for this.
Is there any way to configure a relation that is the same model type to use a different resource url when using it as a relation. e.g. With the model below I want to the relationship url to be /api/paddocks/{paddock_id}/prior_paddocks/sync however the SDK attempting to use /api/paddocks/{paddock_id}/paddocks/sync
export default class Paddock extends Model<{
id: number
...
},
DefaultPersistedAttributes > {
public $resource (): string {
return 'paddocks'
}
...
public prior_paddocks (): BelongsToMany {
return new BelongsToMany(Paddock, this)
}
...}
The text was updated successfully, but these errors were encountered: