File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class DocumentEmbedding:
3030
3131model = Model ()
3232model .entity (DocumentEmbedding )
33- sync_model (model )
33+ sync_model (model , os . path . join ( os . path . dirname ( __file__ ), "obx-model.json" ) )
3434
3535store = objectbox .Store (model = model )
3636box = store .box (DocumentEmbedding )
Original file line number Diff line number Diff line change 1+ {
2+ "_note1" : " KEEP THIS FILE! Check it into a version control system (VCS) like git." ,
3+ "_note2" : " ObjectBox manages crucial IDs for your object model. See docs for details." ,
4+ "_note3" : " If you have VCS merge conflicts, you must resolve them according to ObjectBox docs." ,
5+ "entities" : [
6+ {
7+ "id" : " 1:8004313811940756000" ,
8+ "name" : " DocumentEmbedding" ,
9+ "lastPropertyId" : " 3:1002055376809445224" ,
10+ "properties" : [
11+ {
12+ "id" : " 1:5231290100164136665" ,
13+ "name" : " id"
14+ },
15+ {
16+ "id" : " 2:2794747928415190181" ,
17+ "name" : " document"
18+ },
19+ {
20+ "id" : " 3:1002055376809445224" ,
21+ "name" : " embedding" ,
22+ "indexId" : " 1:5402707781572973098"
23+ }
24+ ]
25+ }
26+ ],
27+ "lastEntityId" : " 1:8004313811940756000" ,
28+ "lastIndexId" : " 1:5402707781572973098" ,
29+ "modelVersionParserMinimum" : 5
30+ }
Original file line number Diff line number Diff line change 11from objectbox .model import *
22from objectbox .model .sync_model import sync_model
3+ import os .path
34
45@Entity ()
56class Task :
@@ -13,5 +14,5 @@ class Task:
1314def get_objectbox_model ():
1415 m = Model ()
1516 m .entity (Task )
16- sync_model (m )
17+ sync_model (m , os . path . join ( os . path . dirname ( __file__ ), "obx-model.json" ) )
1718 return m
Original file line number Diff line number Diff line change 1+ {
2+ "_note1" : " KEEP THIS FILE! Check it into a version control system (VCS) like git." ,
3+ "_note2" : " ObjectBox manages crucial IDs for your object model. See docs for details." ,
4+ "_note3" : " If you have VCS merge conflicts, you must resolve them according to ObjectBox docs." ,
5+ "entities" : [
6+ {
7+ "id" : " 1:6465125355924028123" ,
8+ "name" : " Task" ,
9+ "lastPropertyId" : " 4:8015673551585674115" ,
10+ "properties" : [
11+ {
12+ "id" : " 1:8700906525982901970" ,
13+ "name" : " id"
14+ },
15+ {
16+ "id" : " 2:6068517061615452812" ,
17+ "name" : " text"
18+ },
19+ {
20+ "id" : " 3:1585967268027923630" ,
21+ "name" : " date_created"
22+ },
23+ {
24+ "id" : " 4:8015673551585674115" ,
25+ "name" : " date_finished"
26+ }
27+ ]
28+ }
29+ ],
30+ "lastEntityId" : " 1:6465125355924028123" ,
31+ "lastIndexId" : " 0:0" ,
32+ "modelVersionParserMinimum" : 5
33+ }
Original file line number Diff line number Diff line change 33from objectbox .model .sync_model import sync_model
44import objectbox
55import numpy as np
6-
6+ import os . path
77
88@Entity ()
99class City :
@@ -17,5 +17,5 @@ class City:
1717def get_objectbox_model ():
1818 m = Model ()
1919 m .entity (City )
20- sync_model (m )
20+ sync_model (m , os . path . join ( os . path . dirname ( __file__ ), "obx-model.json" ) )
2121 return m
Original file line number Diff line number Diff line change 1+ {
2+ "_note1" : " KEEP THIS FILE! Check it into a version control system (VCS) like git." ,
3+ "_note2" : " ObjectBox manages crucial IDs for your object model. See docs for details." ,
4+ "_note3" : " If you have VCS merge conflicts, you must resolve them according to ObjectBox docs." ,
5+ "entities" : [
6+ {
7+ "id" : " 1:4817145754065816046" ,
8+ "name" : " City" ,
9+ "lastPropertyId" : " 3:8621035483966640033" ,
10+ "properties" : [
11+ {
12+ "id" : " 1:5906277260829377830" ,
13+ "name" : " id"
14+ },
15+ {
16+ "id" : " 2:1820212786894711110" ,
17+ "name" : " name"
18+ },
19+ {
20+ "id" : " 3:8621035483966640033" ,
21+ "name" : " location" ,
22+ "indexId" : " 1:933206701064379830"
23+ }
24+ ]
25+ }
26+ ],
27+ "lastEntityId" : " 1:4817145754065816046" ,
28+ "lastIndexId" : " 1:933206701064379830" ,
29+ "modelVersionParserMinimum" : 5
30+ }
You can’t perform that action at this time.
0 commit comments