Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#112 0.6.1: _fromDatabase and UNIQUE should result in alternateID

Unstable_(example)
closed-accepted
Oleg Broytman
General (1)
5
2014-10-27
2005-05-25
jared jennings
No

I've got a table which has a UNIQUE column:
CREATE TABLE groups (
id serial PRIMARY KEY,
name varchar(256) UNIQUE
);

When I make it into a class, like so:
class Groups(SQLObject):
_fromDatabase = True

Given that the name column is unique, it's useful and
possible to have the byName method be created, which,
in the absence of _fromDatabase, is done when a Col's
constructor has keyword argument alternateID.

Attached is a patch that does this for PostgreSQL.

Discussion

  • jared jennings
    jared jennings
    2005-05-25

    Automatic alternateID creation for PostgreSQL

     
  • Oleg Broytman
    Oleg Broytman
    2014-10-26

    Ticket moved from /p/sqlobject/bugs/87/

     
  • Oleg Broytman
    Oleg Broytman
    2014-10-27

    • status: open --> closed-accepted
    • assigned_to: Oleg Broytman
    • Group: SQLObject_release_(specify) --> Unstable_(example)
     
  • Oleg Broytman
    Oleg Broytman
    2014-10-27

    Applied. Thank you very much! Sorry it took so long, completely my fault.