Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4605220
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:24:09+00:00 2026-05-22T00:24:09+00:00

I have a question that I’m sure it’s very quick to answer, but I

  • 0

I have a question that I’m sure it’s very quick to answer, but I haven’t been able to find it googling…

I have a class Product defined with declarative SqlAlchemy:

class Product(declarativeBase):
    __tablename__ = "products"
    _brand = Column("brand", Unicode(128))
    _series = Column("series", String(128))
    _price = Column("price", Float)
    _description = Column("description", UnicodeText)

    _manufacturerId = Column("manufacturer_id", Integer, ForeignKey("manufacturers.id"), key="manufacturerId")
    _manufacturer = relationship("Manufacturer",
        uselist=False,
         backref=backref("_products", collection_class=set)
         )

And a a certain point, I want to get some columns of all the Products, such as _brand and _manufacturerId, but instead of retrieving it named _manufacturerId I want it called _manufacturer (mainly to “hide” the relationship thing).

I don’t know how to do that… It would be something like:

session.query(Product.Product._brand, Product.Product._manufacturerId as "_manufacturer").all()

I’m pretty sure that is doable, but I don’t know how (using sqlalchemy 0.6.6, just in case it’s relevant)

Thank you very much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:24:10+00:00Added an answer on May 22, 2026 at 12:24 am

    Actually… I think “label” may work.

    How do I put a SQLAlchemy label on the result of an arithmetic expression?

    If it does, I’ll detail it here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question that I haven't been able to find the answer/script to.
I have a question that is probably very simple, but I cannot find an
I have a question that may have been answered over 9000 times before but
Have a question that I can't seem to find an answer for. I am
I have a question that I cannot answer myself, but it seems like a
I have a question that has been viewed, but with no answers or comments
I have a question that must be answer several times before, but I can't
I have a question that I can't quite find the answer to... If you
I have a question that I tried to find an answer for the last
I have a question that I didn't find a real consistent answer for. That

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.