Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 7c45723

Browse files
committed
Add PK notes
1 parent 8130d8e commit 7c45723

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3413,6 +3413,8 @@ For simplicity, and to be able to have the same POCO class persisted in db4o, me
34133413
to be `Id` although you use `[Alias("DbFieldName")]` attribute it map it to a column with a different name or use
34143414
the `[PrimaryKey]` attribute to tell OrmLite to use a different property for the primary key.
34153415

3416+
If an `Id` property or `[PrimaryKey]` attribute isn't specified, a Primary Key is assigned to `[AutoIncrement]` and `[AutoId]` properties, otherwise it's assumed the first property is the tables Primary Key.
3417+
34163418
You can still `SELECT` from these tables, you will just be unable to make use of APIs that rely on it, e.g.
34173419
`Update` or `Delete` where the filter is implied (i.e. not specified), all the APIs that end with `ById`, etc.
34183420

0 commit comments

Comments
 (0)