-
-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Environment
No response
Reproduction
- Create a new project
- Install
vue,pinia,pinia-orm. - Follow the guide.
- Nothing happens, repository didn't modified.
example.js
import { createPinia, setActivePinia } from "pinia"
import { createORM, Model, useRepo, definePiniaOrmPlugin } from "pinia-orm"
import { createApp } from "vue"
const customPlugin = () => definePiniaOrmPlugin((...args) => {
console.log(args)
return args[0]
})
const app = createApp({})
const pinia = createPinia()
.use(
createORM({
plugins: [
customPlugin(),
]
})
)
app.use(pinia)
setActivePinia(pinia)
class Test extends Model {
static entity = 'test'
static fields() {
return {
id: this.uid(),
firstName: this.string(),
lastName: this.string(),
email: this.string(),
}
}
}
console.log(useRepo(Test))node example.jsOutput
Repository {
database: Database { models: { test: [Test] } },
model: Test { pivot: undefined },
pinia: undefined,
queryCache: WeakCache { [Symbol(Symbol.toStringTag)]: undefined },
hydratedDataCache: Map(0) {},
use: undefined,
config: {
model: {
namespace: '',
withMeta: false,
hidden: [Array],
visible: [Array]
},
cache: { shared: true, provider: [class WeakCache] }
}
}Describe the bug
Plugin system might not working.
Additional context
No response
Logs
No response
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists