Skip to main content
Fix link
Source Link
Ants Aasma
  • 55.2k
  • 16
  • 98
  • 99

This is called the entity-attribute-value pattern. There is an example about this under the SQLAlchemy examples directory: vertical/vertical.pyvertical/.

If you are using PostgreSQL, then there is also the hstore contrib module that can store a string to string mapping. If you are interested then I have some code for a custom type that makes it possible to use that to store extended attributes via SQLAlchemy.

Another option to store custom attributes is to serialize them to a text field. In that case you will lose the ability to filter by attributes.

This is called the entity-attribute-value pattern. There is an example about this under the SQLAlchemy examples directory: vertical/vertical.py.

If you are using PostgreSQL, then there is also the hstore contrib module that can store a string to string mapping. If you are interested then I have some code for a custom type that makes it possible to use that to store extended attributes via SQLAlchemy.

Another option to store custom attributes is to serialize them to a text field. In that case you will lose the ability to filter by attributes.

This is called the entity-attribute-value pattern. There is an example about this under the SQLAlchemy examples directory: vertical/.

If you are using PostgreSQL, then there is also the hstore contrib module that can store a string to string mapping. If you are interested then I have some code for a custom type that makes it possible to use that to store extended attributes via SQLAlchemy.

Another option to store custom attributes is to serialize them to a text field. In that case you will lose the ability to filter by attributes.

Source Link
Ants Aasma
  • 55.2k
  • 16
  • 98
  • 99

This is called the entity-attribute-value pattern. There is an example about this under the SQLAlchemy examples directory: vertical/vertical.py.

If you are using PostgreSQL, then there is also the hstore contrib module that can store a string to string mapping. If you are interested then I have some code for a custom type that makes it possible to use that to store extended attributes via SQLAlchemy.

Another option to store custom attributes is to serialize them to a text field. In that case you will lose the ability to filter by attributes.