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
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ public class Gender extends BaseEntity {
59
59
```java
60
60
@TableName("person")
61
61
publicclassPersonextendsBaseEntity {
62
-
//BaseEntity gives us the id field.
62
+
//BaseEntity gives us the id field.
63
63
// We need to add the rest.
64
64
65
65
privateString name;
@@ -80,6 +80,7 @@ public class Person extends BaseEntity {
80
80
```
81
81
82
82
Every POJO *must* extend `BaseEntity` and have an empty or default constructor.\
83
+
The class `BaseEntity` overrides the `equals` and `hashCode` methods using the `id`. Override them in your entity classes if you need different behavior.\
83
84
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.
84
85
85
86
Then we can go ahead and create the service classes:
0 commit comments