You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Include the Maven artifact:
27
27
<dependency>
28
28
<groupId>com.github.collinalpert</groupId>
29
29
<artifactId>java2db</artifactId>
30
-
<version>6.0.0</version>
30
+
<version>6.0.1</version>
31
31
</dependency>
32
32
```
33
33
@@ -103,8 +103,10 @@ public class Person extends BaseEntity {
103
103
```
104
104
105
105
Every POJO *must* extend `BaseEntity` and have an empty or default constructor.\
106
-
The class `BaseEntity` overrides the `equals` and `hashCode` methods using the `id`. Override them in your entity classes if you need different behavior.\
107
-
If you want to have a field in your POJO that should be ignored by Java2DB, you can apply the `Ignore` attribute to the specific field.
106
+
The class `BaseEntity` overrides the `equals` and `hashCode` methods using the `id`. Override them in your entity
107
+
classes if you need different behavior.\
108
+
If you want to have a field in your POJO that should be ignored by Java2DB, you can apply the `Ignore` attribute or
109
+
the `transient` modifier to the specific field.
108
110
109
111
Then we can go ahead and create the service classes:
110
112
@@ -144,7 +146,7 @@ the [Asynchronous operations](#asynchronous-operations) section.
144
146
#### Read
145
147
146
148
The `BaseService` provides a `createQuery` method which allows you to manually build a query and then execute it with
147
-
the `toList`, `toStream`, `toArray` or `toMap` methods. You should only need this approach seldomly.\
149
+
the `toList`, `toStream`, `toArray` or `toMap` methods. You should only need this approach seldom.\
148
150
Much rather, use the `getSingle` or `getMultiple` methods. `getMultiple` returns an `EntityQuery` object with a
149
151
preconfigured WHERE condition and then allows you to chain some additional query options. As of the
150
152
current `EntityQuery` version, WHERE, LIMIT, ORDER BY and GROUP BY are supported. Effectively, the
@@ -231,7 +233,11 @@ You can also check if a table has at least one row by calling `personService.any
231
233
To check if a column's values are unique in a table, use the `hasDuplicates` method provided by the `BaseService`. It will return `true` if there is at least one duplicate value and false if all the values are unique.
232
234
233
235
### Programmability
234
-
The `DBConnection` class offers the possibility to call a stored procedure and a function. Simply use the `callStoredProcedure` or `callFunction` method, respectively and pass in the class you would like the result mapped to. Using the `@Ignore` annotation will also work with these kinds of calls. Please make sure your class has an empty constructor.
236
+
237
+
The `DBConnection` class offers the possibility to call a stored procedure and a function. Simply use
238
+
the `callStoredProcedure` or `callFunction` method, respectively and pass in the class you would like the result mapped
239
+
to. Using the `@Ignore` annotation or the `transient` modifier will also work with these kinds of calls. Please make
0 commit comments