Skip to content

Commit 6458bb0

Browse files
committed
Docs: Add docs / guides for writing queries and using transactions
1 parent 7ba550c commit 6458bb0

3 files changed

Lines changed: 894 additions & 10 deletions

File tree

docs/guides/README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ existing Maven project. Complete the steps in order.
2020
| [Entity Bean Creation](entity-bean-creation.md) | How to generate clean, idiomatic Ebean entity beans for AI agents; patterns and anti-patterns; minimal boilerplate without getters/setters; decision tree for code generation |
2121
| [Lombok with Ebean entity beans](lombok-with-ebean-entity-beans.md) | Which Lombok annotations to use and avoid on entity beans; why `@Data` is incompatible with Ebean; how to use `@Getter` + `@Setter` + `@Accessors(chain = true)` |
2222

23+
## Querying
24+
25+
| Guide | Description |
26+
|-------|-------------|
27+
| [Write Ebean queries with query beans](writing-ebean-query-beans.md) | Step-by-step guidance for AI agents to write type-safe Ebean queries; choose the right terminal method; tune `select()` / `fetch()` / `fetchQuery()`; and project to DTOs when entity beans are not the right output |
28+
29+
## Persisting & transactions
30+
31+
| Guide | Description |
32+
|-------|-------------|
33+
| [Persisting and transactions with Ebean](persisting-and-transactions-with-ebean.md) | Step-by-step guidance for AI agents to choose `insert` / `save` / `update` / `delete`; inspect cascades; select the right transaction boundary; and use batch or bulk update for large write sets |
34+
2335
## Testing
2436

2537
| Guide | Description |
@@ -61,10 +73,10 @@ Add a section near the top of your project README:
6173
## AI Agent Instructions
6274

6375
This project uses [Ebean ORM](https://ebean.io). Step-by-step guides for common
64-
Ebean tasks (Maven setup, database configuration, test containers, DB migrations,
65-
Lombok) are at:
76+
Ebean tasks (Maven setup, database configuration, query writing, transactions,
77+
test containers, DB migrations, Lombok) are at:
6678

67-
**https://github.com/ebean-orm/ebean/tree/main/docs/guides/**
79+
**https://github.com/ebean-orm/ebean/tree/HEAD/docs/guides/**
6880

6981
AI agents should fetch and follow the relevant guide before performing Ebean-related
7082
tasks.
@@ -85,14 +97,16 @@ discover the guides without requiring tool-specific configuration files.
8597
## Ebean ORM
8698

8799
This project uses [Ebean ORM](https://ebean.io). Step-by-step guides for common
88-
tasks are at: https://github.com/ebean-orm/ebean/tree/main/docs/guides/
100+
tasks are at: https://github.com/ebean-orm/ebean/tree/HEAD/docs/guides/
89101

90102
Key guides (fetch and follow these when performing the relevant task):
91-
- Maven POM setup: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/add-ebean-postgres-maven-pom.md
92-
- Database configuration: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/add-ebean-postgres-database-config.md
93-
- Test container setup: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/add-ebean-postgres-test-container.md
94-
- DB migration generation: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/add-ebean-db-migration-generation.md
95-
- Lombok with entity beans: https://raw.githubusercontent.com/ebean-orm/ebean/main/docs/guides/lombok-with-ebean-entity-beans.md
103+
- Maven POM setup: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-postgres-maven-pom.md
104+
- Database configuration: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-postgres-database-config.md
105+
- Write queries with query beans: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/writing-ebean-query-beans.md
106+
- Persisting and transactions: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/persisting-and-transactions-with-ebean.md
107+
- Test container setup: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-postgres-test-container.md
108+
- DB migration generation: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/add-ebean-db-migration-generation.md
109+
- Lombok with entity beans: https://raw.githubusercontent.com/ebean-orm/ebean/HEAD/docs/guides/lombok-with-ebean-entity-beans.md
96110
```
97111

98112
### Claude Code — `CLAUDE.md`
@@ -112,5 +126,5 @@ alwaysApply: false
112126

113127
This project uses Ebean ORM. Before performing any Ebean-related task, fetch and
114128
follow the relevant step-by-step guide from:
115-
https://github.com/ebean-orm/ebean/tree/main/docs/guides/
129+
https://github.com/ebean-orm/ebean/tree/HEAD/docs/guides/
116130
```

0 commit comments

Comments
 (0)