Skip to content

Commit d22f75f

Browse files
committed
Removed extra description in README
1 parent 7116d72 commit d22f75f

File tree

1 file changed

+0
-122
lines changed

1 file changed

+0
-122
lines changed

README.md

Lines changed: 0 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -48,125 +48,3 @@ session.commit() # or seeder.session.commit()
4848
## Documentation
4949

5050
<https://sqlalchemyseed.readthedocs.io/>
51-
52-
## No Relationship
53-
54-
```json5
55-
// data.json
56-
[
57-
{
58-
"model": "models.Person",
59-
"data": {
60-
"name": "You",
61-
"age": 18
62-
}
63-
},
64-
// when you have two or more objects of the same model, you can
65-
{
66-
"model": "models.Person",
67-
"data": [
68-
{
69-
"name": "You",
70-
"age": 18
71-
},
72-
{
73-
"name": "Still You But Older",
74-
"age": 40
75-
}
76-
]
77-
}
78-
]
79-
```
80-
81-
## One to One
82-
83-
```json5
84-
// test_data.json
85-
[
86-
{
87-
"model": "models.Person",
88-
"data": {
89-
"name": "John",
90-
"age": 18,
91-
// creates a job object
92-
"!job": {
93-
"model": "models.Job",
94-
"data": {
95-
"job_name": "Programmer",
96-
}
97-
}
98-
}
99-
},
100-
// or this, if you want to add relationship that exists
101-
// in your database use 'filter' instead of 'data'
102-
{
103-
"model": "models.Person",
104-
"data": {
105-
"name": "Jeniffer",
106-
"age": 18,
107-
"!job": {
108-
"model": "models.Job",
109-
"filter": {
110-
"job_name": "Programmer",
111-
}
112-
}
113-
}
114-
}
115-
]
116-
```
117-
118-
## One to Many
119-
120-
```json5
121-
//test_data.json
122-
[
123-
{
124-
"model": "models.Person",
125-
"data": {
126-
"name": "John",
127-
"age": 18,
128-
"!items": [
129-
{
130-
"model": "models.Item",
131-
"data": {
132-
"name": "Pencil"
133-
}
134-
},
135-
{
136-
"model": "models.Item",
137-
"data": {
138-
"name": "Eraser"
139-
}
140-
}
141-
]
142-
}
143-
}
144-
]
145-
```
146-
147-
## Example of Nested Relationships
148-
149-
```json
150-
{
151-
"model": "models.Parent",
152-
"data": {
153-
"name": "John Smith",
154-
"!children": [
155-
{
156-
"model": "models.Child",
157-
"data": {
158-
"name": "Mark Smith",
159-
"!children": [
160-
{
161-
"model": "models.GrandChild",
162-
"data": {
163-
"name": "Alice Smith"
164-
}
165-
}
166-
]
167-
}
168-
}
169-
]
170-
}
171-
}
172-
```

0 commit comments

Comments
 (0)