473,394 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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
Dec 29 '07 #1
3 926
On Dec 29, 12:27 pm, "bruce" <bedoug...@earthlink.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
Dec 29 '07 #2
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
Dec 29 '07 #3
On Dec 28, 11:27 pm, "bruce" <bedoug...@earthlink.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:

http://www.sqlobject.org/SQLObject.html#class-sqlmeta

i.
Dec 29 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Robin Munn | last post by:
I've been loving SQLObject. The ability to set up a database connection and then completely *forget* about it and just manipulate Python objects has been great. But I'm running into a problem, and...
1
by: Oleg Broytmann | last post by:
Hello! I'm pleased to announce the 0.7.2 release of SQLObject. What is SQLObject ================= SQLObject is an object-relational mapper. Your database tables are described as classes,...
0
by: Oleg Broytmann | last post by:
Hello! I'm pleased to announce the 0.8.0b1 release of SQLObject. This is the first beta of the new branch. Taking into account that it is a result of rather large job the beta period will be...
3
by: Oleg Broytmann | last post by:
Hello! I'm pleased to announce the 0.8.0b2 release of SQLObject. What is SQLObject ================= SQLObject is an object-relational mapper. Your database tables are described as...
0
by: Oleg Broytmann | last post by:
Hello! I'm pleased to announce the 0.8.0b3 release of SQLObject. What is SQLObject ================= SQLObject is an object-relational mapper. Your database tables are described as...
0
by: Oleg Broytmann | last post by:
Hello! I'm pleased to announce the 0.8.0 release of SQLObject. What is SQLObject ================= SQLObject is an object-relational mapper. Your database tables are described as...
0
by: Oleg Broytmann | last post by:
Hello! I'm pleased to announce the 0.7.4 release of SQLObject. What is SQLObject ================= SQLObject is an object-relational mapper. Your database tables are described as classes,...
4
by: petr.jakes.tpc | last post by:
Hi, inspired by the article written by Tarek Ziade in the February 07 issue of the "Linux +" magazine I am experimenting with the doctest module. I have two files, "displeje_pokus.py" and...
0
by: Oleg Broytmann | last post by:
Hello! I'm pleased to announce the 0.10.0b1, the first beta release of a new SQLObject branch, 0.10. What is SQLObject ================= SQLObject is an object-relational mapper. Your...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.