From 6b443b2cde87abc6ecbc67e8d793f30c59e91552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=97=A5=E5=A4=A9?= <61126721+TrueNine@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:35:26 +0800 Subject: [PATCH 1/3] =?UTF-8?q?doc=20=E6=9B=B4=E6=AD=A3=E5=90=8C=E9=9F=B3?= =?UTF-8?q?=E9=94=99=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../current/mutation/draft-interceptor.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/mutation/draft-interceptor.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/mutation/draft-interceptor.mdx index 20ac6f24e..92fb1abb6 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/mutation/draft-interceptor.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/mutation/draft-interceptor.mdx @@ -197,7 +197,7 @@ class BaseEntityDraftInterceptor( 上文谈到,如果当前操作为`UPDATE`,`beforeSave`方法的`original`参数非null,表示数据库中的旧值。 -`original`是Jimmer动态对象,默认情况下,只有`id`和`key`属性是已加载和可访问的。然而,是否能够控制`original`对象的格式让跟多的属性可以被访问呢? +`original`是Jimmer动态对象,默认情况下,只有`id`和`key`属性是已加载和可访问的。然而,是否能够控制`original`对象的格式让更多的属性可以被访问呢? `DraftInterceptor`接口提供了另外一个default方法`dependencies`,返回一个属性集合,以表示除了id属性和key属性外,`original`对象还有那些属性需要被加载。 From 274123c2a23af27f01c1ac09e0bfe3647b83b7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=97=A5=E5=A4=A9?= <61126721+TrueNine@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:53:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?doc:=20=E4=BF=AE=E6=AD=A3=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../current/object/view/dto-language.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/object/view/dto-language.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/object/view/dto-language.mdx index 034c0056e..bc231b200 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/object/view/dto-language.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/object/view/dto-language.mdx @@ -572,7 +572,7 @@ input UpdateBookInput { ``` :::info - 对于一个实体对象而言,如果改属性对应的值为null,在使用Input DTO的构造方法将其转化为Input DTO对象是,由于DTO中对应的属性不允许为null,将会导致一场。 + 对于一个实体对象而言,如果改属性对应的值为null,在使用Input DTO的构造方法将其转化为Input DTO对象是,由于DTO中对应的属性不允许为null,将会导致异常。 这就是`unsafe`关键字的意义。 ::: From 7e18876982f19f24c24eb5e165132607625f36cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=97=A5=E5=A4=A9?= <61126721+TrueNine@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:37:36 +0800 Subject: [PATCH 3/3] =?UTF-8?q?doc:=20=E6=9B=B4=E6=AD=A3=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../current/spring/repository/dto.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/spring/repository/dto.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/spring/repository/dto.mdx index 568aa0242..95d44535e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/spring/repository/dto.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/spring/repository/dto.mdx @@ -261,7 +261,7 @@ BookDetailView( ) ``` -不难发现,虽然现在查询不再返回动态实体对象,但功能和却和对象抓取器完全一样。这什么为什么呢? +不难发现,虽然现在查询不再返回动态实体对象,但功能和却和对象抓取器完全一样。这是为什么呢? 其实在`BookDetailView`类内部包含一个自动生成的对象抓取器,Jimmer靠它从数据库中查询了形状匹配的动态实体对象,并将之自动转化为DTO对象。 @@ -510,4 +510,4 @@ interface BookRepository : KRepository { :::tip 所有底层查询API都可以用`viewType`替换`fetcher`,再次印证了本文开头所说DTO语言本质上是对象抓取器的另外一种表达方式。 -::: \ No newline at end of file +:::