Comments (7)
可以提供一段可以复现的代码吗?如果能够更进一步在 https://github.com/goravel/example 中提供一个复现 PR 将会更好。thanks!
上面是分别复现两种情况的补丁文件,希望能帮助到你
from goravel.
Hi @linshuboy 👋
Thanks for opening this issue to Goravel, we will respond as soon as possible! 💖
感谢您向 Goravel 提出此 Issue,我们将尽快反馈! 💖
If you like this project, please ⭐star⭐ our repository to support us!
如果您喜欢这个项目,请 Star 仓库给予我们支持!
from goravel.
可以提供一段可以复现的代码吗?如果能够更进一步在 https://github.com/goravel/example 中提供一个复现 PR 将会更好。thanks!
from goravel.
事件回调拿不到ID.patch
事件能拿到ID,但是更新也会触发创建后事件.patch
from goravel.
事件回调拿不到ID: 是因为 id
被嵌套在了 orm.Model
中,框架上没处理到这个情况,将会修复下,目前你可以将 orm.Model
定义的内容整体移到外层,这样就可以拿到 id
了;
事件能拿到ID,但是更新也会触发创建后事件:应该是因为你定义了两个 primaryKey,可以删除下图的 ID 试下,应该就不会触发 created 了,但这时会变为第一种情况,拿不到 id
。
感谢反馈!
from goravel.
事件回调拿不到ID: 是因为
id
被嵌套在了orm.Model
中,框架上没处理到这个情况,将会修复下,目前你可以将orm.Model
定义的内容整体移到外层,这样就可以拿到id
了;事件能拿到ID,但是更新也会触发创建后事件:应该是因为你定义了两个 primaryKey,可以删除下图的 ID 试下,应该就不会触发 created 了,但这时会变为第一种情况,拿不到
感谢反馈!id
。
感谢响应,这个问题修复会在短时间之内上线吗?
from goravel.
是的,预期会修复到 1.13.10
from goravel.
Related Issues (20)
- ✨ [Feature] The queue log needs to be controled by APP_DEBUG HOT 1
- 🐛 [Bug] The context that set by facades.Orm().WithContext() isn't passed to orm events HOT 1
- ✨ [Feature] Supports configuring the json serialization/deserialization package in config/app.go HOT 2
- 🐛 [Bug] Minio does not implement filesystem.Driver HOT 2
- ✨ [Feature] Use contributors api to automatically generate contributors images in README HOT 4
- 🐛 [Bug] The new line print of Log is incorrect HOT 1
- ✨ [Feature] The trace of log can be clicked as a link HOT 1
- ✨ [Feature] Add a -f flag for make commands, to avoid cover the existing file by mistake HOT 1
- ✨ [Feature] Map the Installer to the Docs HOT 2
- ✨ [Feature] DB supports configure SSL HOT 1
- 🐛 [Bug] The traces don't cleaned when calling Log.Info after Log.Error HOT 1
- 🐛 [Bug] Nil pointer dereference on validation HOT 4
- ✨ [Feature] Orm implements convenient expansion of other drivers HOT 1
- ✨ [Feature] Optimize the backslash when using facades.Route().Prefix("/product") HOT 1
- ✨ [Feature] - Any support for sqlx HOT 1
- ✨ [Feature] Remove gookit/color, use pterm/pterm instead HOT 1
- ✨ [Feature] Add ToSql, ToRawSql methods for orm HOT 2
- ✨ [Feature] translation support set lang path HOT 6
- ✨ [Feature] Default api route HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goravel.