summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/declarative.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-0/+6
| | | | | a consistent tag - AUTHORS file
* - restore declarative support for "composite"Mike Bayer2010-12-231-2/+2
| | | | - add an example of mutable scalars with events
* - merge metadata/schema/declarative branch, [ticket:1893]Mike Bayer2010-11-201-3/+14
|\
| * merge tipMike Bayer2010-11-181-0/+4
| |\
| * | [ticket:1893] implementationMike Bayer2010-11-151-3/+14
| | |
* | | merge tipMike Bayer2010-11-181-0/+4
|\ \ \ | | |/ | |/|
| * | - An error is raised if __table_args__ is not in tupleMike Bayer2010-11-171-0/+4
| |/ | | | | | | or dict format, and is not None. [ticket:1972]
* | merge tipMike Bayer2010-11-141-82/+244
|\ \ | |/
| * - A mixin can now specify a column that overridesMike Bayer2010-10-211-1/+1
| | | | | | | | | | a column of the same name associated with a superclass. Thanks to Oystein Haaland.
| * editMike Bayer2010-10-171-2/+3
| |
| * warn when two classes with the same name end up in the declarative registryChris Withers2010-10-061-0/+7
| |
| * document creating indexes for columns in mixinsChris Withers2010-10-041-0/+75
| |
| * - add additional logic that duplicates mapper's prop.copy(); ↵Mike Bayer2010-10-011-5/+20
| | | | | | | | | | | | | | | | | | prop.columns.append(col) logic when columns are present in a joined subclass with an attribute name different than the column name itself [ticket:1931] - add coverage to verify that we need to check (obj.name or name) when deciding if a Column from a mixin should be added to the mapped table
| * - Fixed bug whereby columns on a mixin wouldn't propagateMike Bayer2010-09-281-3/+6
| | | | | | | | | | | | | | correctly to a single-table inheritance scheme where the attribute name is different than that of the column. [ticket:1930]. Note [ticket:1931] which is the same issue for joined inh, not yet resolved.
| * @mapperproperty -> @declared_attrMike Bayer2010-09-271-31/+31
| |
| * - @classproperty 's official name/location for usageMike Bayer2010-09-251-36/+85
| | | | | | | | | | | | | | with declarative is sqlalchemy.ext.declarative.mapperproperty. Same thing, but moving there since it is more of a "marker" that's specific to declararative, not just an attribute technique. [ticket:1915]
| * make less ficticious ;-)Chris Withers2010-09-241-2/+2
| |
| * - @classproperty (soon/now @mapperproperty) takes effect forMike Bayer2010-09-201-43/+55
| | | | | | | | | | | | __mapper_args__, __table_args__, __tablename__ on a base class that is not a mixin, as well as mixins. [ticket:1922]
| * - fix test_single test to use default dialectMike Bayer2010-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The exception raised by Session when it is used subsequent to a subtransaction rollback (which is what happens when a flush fails in autocommit=False mode) has now been reworded (this is the "inactive due to a rollback in a subtransaction" message). In particular, if the rollback was due to an exception during flush(), the message states this is the case, and reiterates the string form of the original exception that occurred during flush. If the session is closed due to explicit usage of subtransactions (not very common), the message just states this is the case. - The exception raised by Mapper when repeated requests to its initialization are made after initialization already failed no longer assumes the "hasattr" case, since there's other scenarios in which this message gets emitted, and the message also does not compound onto itself multiple times - you get the same message for each attempt at usage. The misnomer "compiles" is being traded out for "initialize".
* | merge tipMike Bayer2010-09-141-0/+2
|\ \ | |/
| * continued...Mike Bayer2010-09-041-0/+2
| |
* | merge latest tipMike Bayer2010-09-031-2/+5
|\ \ | |/
| * - a large hill to climb. Added declarative examples to all theMike Bayer2010-08-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "basic relationship" examples, cleaned up the examples and added some more explicitness. Also renamed "treenodes" to "nodes" and added self-referential declarative example. - Added info/examples on how to join tables directly when querying with joined table inheritance. - Starting to talk about hybrids in the main mapper docs some more. introducoed the idea that synonyms are on their way out. - SQL expressions as mapped attributes also gets better verbiage, alternative approaches to them, including hybrids. - modernized the hybrid example. - object_session() as a standalone function wasn't documented ?!
| * - put a link to the wiki table config exampleMike Bayer2010-08-271-1/+3
| |
* | merge tipMike Bayer2010-08-141-1/+1
|\ \ | |/
| * - Another pass through the series of error messagesMike Bayer2010-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emitted when relationship() is configured with ambiguous arguments. The "foreign_keys" setting is no longer mentioned, as it is almost never needed and it is preferable users set up correct ForeignKey metadata, which is now the recommendation. If 'foreign_keys' is used and is incorrect, the message suggests the attribute is probably unnecessary. Docs for the attribute are beefed up. This because all confused relationship() users on the ML appear to be attempting to use foreign_keys due to the message, which only confuses them further since Table metadata is much clearer. - If the "secondary" table has no ForeignKey metadata and no foreign_keys is set, even though the user is passing screwed up information, it is assumed that primary/secondaryjoin expressions should consider only and all cols in "secondary" to be foreign. It's not possible with "secondary" for the foreign keys to be elsewhere in any case. A warning is now emitted instead of an error, and the mapping succeeds. [ticket:1877] - fixed incorrect "Alternate Collection Mappings" reference in the docs, not sure if someone wants to reference "Rows that Point to Themselves" function - "Collection Mapping" is "Advanced Collection Mapping", this section is troublesome since nobody really needs it but it is public API
* | fix declarativeMike Bayer2010-08-061-3/+4
|/
* - dont like this noteMike Bayer2010-08-031-15/+15
| | | | | - rewrite this section, also don't talk about extensions anymore since they will be replaced
* fixes, clarifications, removal of misleading statementsMike Bayer2010-08-031-38/+44
|
* - dont like that example, its too much for a section that otherwise isn't soMike Bayer2010-08-031-116/+31
| | | | in depth
* - add an example of declarative with hybrid, including why thisMike Bayer2010-08-021-0/+115
| | | | | is a different use case (i.e. formalized apps vs. quickstart). - solidified docstrings for ForeignKey
* - Fixed bug where "Can't add additional column" messageMike Bayer2010-08-021-1/+2
| | | | would display the wrong name.
* - if @classproperty is used with a regular class-boundMike Bayer2010-08-021-16/+81
| | | | | | | | | | | | | | mapper property attribute, it will be called to get the actual attribute value during initialization. Currently, there's no advantage to using @classproperty on a column or relationship attribute of a declarative class that isn't a mixin - evaluation is at the same time as if @classproperty weren't used. But here we at least allow it to function as expected. - docs for column_property() with declarative - mixin docs in declarative made more clear - mixins are optional - each subsection starts with, "in *declarative mixins*", to reduce confusion
* - worked through about 25% of mappers.rst to implementMike Bayer2010-08-011-0/+2
| | | | | up to date and clear explanations of things, including as much context and description as possible
* - pull out type() ahead of time to cut down on fn calls.Mike Bayer2010-07-131-2/+3
| | | | | | Would replace this with set(dir(self)) but not sure if some class schemes may have issues with dir() (also for low numbers of args, not using the set() probably faster).
* - doc fixes regarding __tablename__ mixinMike Bayer2010-07-101-58/+78
| | | | - 78 chars
* transfer docstrings from @classproperty to propsMike Bayer2010-07-041-1/+5
|
* - Added support for @classproperty to provideMike Bayer2010-07-031-56/+220
| | | | | | | | | | | | any kind of schema/mapping construct from a declarative mixin, including columns with foreign keys, relationships, column_property, deferred. This solves all such issues on declarative mixins. An error is raised if any MapperProperty subclass is specified on a mixin without using @classproperty. [ticket:1751] [ticket:1796] [ticket:1805] - un-anglicized the declarative docs
* keep ordering of columns with mixins constantChris Withers2010-07-021-1/+2
|
* - a mixin class can now define a column that matchesMike Bayer2010-06-191-2/+4
| | | | | | | one which is present on a __table__ defined on a subclass. It cannot, however, define one that is not present in the __table__, and the error message here now works. [ticket:1821]
* docs for new mixin class control abilitiesChris Withers2010-04-131-0/+96
|
* helper method for spotting inherited tablesChris Withers2010-04-131-1/+10
|
* I think I'm about to have a When Harry Met Sally momentChris Withers2010-04-131-6/+15
|
* close, but still no cigarChris Withers2010-04-131-24/+23
|
* remove tortologyChris Withers2010-04-131-2/+2
|
* handle propagationChris Withers2010-04-121-21/+25
|
* refactor to highlight the problem areasChris Withers2010-04-121-22/+13
|
* no need for this to be a functionChris Withers2010-04-091-4/+1
|
* - Further reworked the "mixin" logic in declarative toMike Bayer2010-04-061-37/+40
| | | | | additionally allow __mapper_args__ as a @classproperty on a mixin, such as to dynamically assign polymorphic_identity.
* - Declarative will raise an informative error messageMike Bayer2010-04-021-2/+6
| | | | | if a non-mapped class attribute is referenced in the string-based relationship() arguments.