Skip to content

Commit

Permalink
Merge pull request #83 from rover12421/rs
Browse files Browse the repository at this point in the history
Some minor detail modifications
  • Loading branch information
babyfish-ct authored Dec 17, 2024
2 parents 407bbc8 + 3a71f0f commit 25cc071
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/quick-view/get-started/create-database.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The examples in this tutorial require the following four entity types:

This tutorial uses MySQL. Create a new SQL file `jimmer-demo.sql` with the following code:

```csharp
```sql title="jimmer-demo.sql"
create database jimmer_demo;
use jimmer_demo;

Expand Down
8 changes: 4 additions & 4 deletions docs/quick-view/get-started/define-entity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Assume the entity package is "com.example.model". **Ignore associated properties
<Tabs groupId="language">
<TabItem value="java" label="Java">

```java title="Author.java"
```java title="Gender.java"
package com.example.model;

import org.babyfish.jimmer.sql.EnumItem;
Expand All @@ -210,7 +210,7 @@ Assume the entity package is "com.example.model". **Ignore associated properties

<TabItem value="kotlin" label="Kotlin">

```kotlin title="Author.kt"
```kotlin title="Gender.kt"
package com.example.model

import org.babyfish.jimmer.sql.EnumItem
Expand Down Expand Up @@ -325,8 +325,8 @@ package com.example.model;
@Entity
public interface Book {

...other properties omitted...

...other properties omitted...
// highlight-next-line
@ManyToOne
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ title: 创建数据库

本教程例子采用MySQL,新建SQL文件`jimmer-demo.sql`,代码如下

```csharp title="jimmer-demo.sql"
```sql title="jimmer-demo.sql"
create database jimmer_demo;
use jimmer_demo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ import TabItem from '@theme/TabItem';
</TabItem>
<TabItem value="kotlin" label="Kotlin">

```kotlin title="Book.kt"
```kotlin title="Author.kt"
package com.example.model

import org.babyfish.jimmer.sql.*
Expand Down Expand Up @@ -200,7 +200,7 @@ import TabItem from '@theme/TabItem';
<Tabs groupId="language">
<TabItem value="java" label="Java">

```java title="Author.java"
```java title="Gender.java"
package com.example.model;

import org.babyfish.jimmer.sql.EnumItem;
Expand All @@ -218,7 +218,7 @@ import TabItem from '@theme/TabItem';
</TabItem>
<TabItem value="kotlin" label="Kotlin">

```kotlin title="Book.kt"
```kotlin title="Gender.kt"
package com.example.model

import org.babyfish.jimmer.sql.EnumItem
Expand Down Expand Up @@ -265,7 +265,7 @@ import TabItem from '@theme/TabItem';
</TabItem>
<TabItem value="kotlin" label="Kotlin">

```kotlin title="Book.kt"
```kotlin title="TreeNode.kt"
package com.example.model

import org.babyfish.jimmer.sql.*
Expand Down Expand Up @@ -401,7 +401,7 @@ public interface BookStore {
</TabItem>
<TabItem value="kotlin" label="Kotlin">

```kotlin title="Book.kt"
```kotlin title="BookStore.kt"
package com.example.model

...省略导入语句...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Precompiler from '../../_shared/precompiler.mdx';
:::caution
注意,上面的代码,仅仅针对初次入门时项目结构没有切分的场景。

如果把实实体的定义剥离成一个独立项目、和其他数据层业务层开,这套代码生成器需要配置到实体定义项目中。
如果把实体的定义剥离成一个独立项目,和其他数据层业务层开,这套代码生成器需要配置到实体定义项目中。
为了保证实体定义项目的简单,原则上讲应该只添加一个最简单的的依赖:`jimmer-core`

Jimmer定义数据类型需要如下4个注解之一
Expand Down

0 comments on commit 25cc071

Please sign in to comment.