sqlobject issue/question...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bruce

    #1

    sqlobject issue/question...

    hi....

    i'm playing around, researching sqlobject, and i notice that it appears to
    require the use of "id" in each tbl it handles in the database.

    if i already have a db schema, and it doesn't use 'id' as an auto-generated
    field, does that mean that i can't use/implement sqlobject.

    is there a way to overide this function/behavior...

    thanks


  • DarkBlue

    #2
    Re: sqlobject issue/question...

    On Dec 29, 12:27 pm, "bruce" <bedoug...@eart hlink.netwrote:
    hi....
    >
    i'm playing around, researching sqlobject, and i notice that it appears to
    require the use of "id" in each tbl it handles in the database.
    >
    if i already have a db schema, and it doesn't use 'id' as an auto-generated
    field, does that mean that i can't use/implement sqlobject.
    >
    is there a way to overide this function/behavior...
    >
    thanks
    If you want to use all the power in sqlobject you will need the
    "id" , you may get away without having one if you use the build in
    raw sql facility exclusively , but then again you probably would
    not need sqlobject anyway.

    You also might want to take a look at sqlalchemy .
    Whichever you choose, if you are used to write complex queries in sql
    it will take some time to wrap your mind around any of them.

    Db

    Comment

    • Diez B. Roggisch

      #3
      Re: sqlobject issue/question...

      bruce schrieb:
      hi....
      >
      i'm playing around, researching sqlobject, and i notice that it appears to
      require the use of "id" in each tbl it handles in the database.
      >
      if i already have a db schema, and it doesn't use 'id' as an auto-generated
      field, does that mean that i can't use/implement sqlobject.
      >
      is there a way to overide this function/behavior...
      ORMs are best used not to map, but to model the data-structures. If you
      already have a schema and have to keep it, SQLAlchemy might be a better
      choice.

      Diez

      Comment

      • Istvan Albert

        #4
        Re: sqlobject issue/question...

        On Dec 28, 11:27 pm, "bruce" <bedoug...@eart hlink.netwrote:
        i'm playing around, researching sqlobject, and i notice that it appears to
        require the use of "id" in each tbl it handles in the database.
        is there a way to overide this function/behavior...
        there better be such way. An ORM that does not allow you to override
        what the primary keys are called would be quite limited. Look at
        sqlmeta data:



        i.

        Comment

        Working...