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
* Atualizar o README.md
* Atualizar o README.md
* Update README.md
* Update README.md
* Update README.md
plz input url
* Update README.md
Co-authored-by: Luis Gustavo <[email protected]>
* Apply suggestions from code review
Co-authored-by: Luis Gustavo <[email protected]>
* Update README.md
* Bring back old examples and add new sections
* fix typo and downloads url
* update downloads badge to use monthly numbers
* add a table of contents and add a url to the main project
* fix enum description and add a docs reference
* Change limitaions link to supported-types
---------
Co-authored-by: Luis Gustavo <[email protected]>
|`Enum`|`enum.Enum`| The Python enum that the column is mapped to must be decorated with`@strawberry.enum` ([strawberry enum docs][strawberry-enum-docs-url]) |
185
+
186
+
156
187
157
188
Additional types can be supported by passing `extra_sqlalchemy_type_to_strawberry_type_map`,
158
189
although support for `TypeDecorator` types is untested.
159
190
191
+
### Association Proxies
192
+
160
193
Association proxies are expected to be of the form `association_proxy('relationship1', 'relationship2')`,
161
194
i.e., both properties are expected to be relationships.
195
+
If your `association_proxy` does not follow the expected form, you should add it to `__exclude__` to prevent an exception from being raised.
196
+
197
+
### Polymorphic Hierarchies
162
198
163
199
Roots of polymorphic hierarchies **are supported**, but are also expected to be registered via
164
200
`strawberry_sqlalchemy_mapper.interface()`, and its concrete type and
165
201
its descendants are expected to inherit from the interface:
166
202
167
203
```python
168
-
classBook(Model):
204
+
# models.py
205
+
from sqlalchemy import Column
206
+
207
+
Base = declarative_base()
208
+
209
+
210
+
classBook(Base):
169
211
id= Column(UUID, primary_key=True)
170
212
171
213
@@ -213,24 +255,23 @@ If you have a suggestion that would make this better, please fork the repo and c
213
255
4. Push to the Branch (git push origin feature)
214
256
5. Open a Pull Request
215
257
216
-
For more details on how to contribute, as well as how to setup the project on your local machine, please refer to [the docs](CONTRIBUTING.rst)
258
+
For more details on how to contribute, as well as how to setup the project on your local machine, please refer to [the contributing docs](CONTRIBUTING.rst)
217
259
218
260
219
261
### Prerequisites
220
262
221
-
This project uses `pre-commit`_, please make sure to install it before making any
263
+
This project uses `pre-commit`, please make sure to install it before making any
222
264
changes::
223
265
224
266
pip install pre-commit
225
267
cd strawberry-sqlalchemy-mapper
226
268
pre-commit install
227
269
228
-
It is a good idea to update the hooks to the latest version::
229
-
230
-
pre-commit autoupdate
231
270
232
271
Don't forget to tell your contributors to also install and use pre-commit.
233
272
273
+
>💡 Tip: You can also use our DevContainer setup for a fully configured development environment, including pre-commit, Python, PostgreSQL, and all required dependencies. This is the fastest way to get started.
0 commit comments