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 5962361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:05:41+00:00 2026-05-22T19:05:41+00:00

For my project management application, I am currently using Single Table Inheritance so that:

  • 0

For my project management application, I am currently using Single Table Inheritance so that:

Lead < Requirement

Project < Requirement

By which I mean to say that Lead is a Requirement and Project is a Requirement. It was okay, while I had these two only. Then I had another similar thing (Tender), so I created

Tender < Requirement

Now the problem is when a Tender converts to a project there is no way for me to identify which projects were Tenders and which were Leads. So I can’t say for example:

Out of 100 leads I get 20 projects and out of 100 Tenders I get 5 projects.

For now as a workaround I think I can use boolean field to say if this was a tender. But that defeats the purpose of having STI. Is there another way to do this using STI itself. Or are booleans [or some sort of category/project_type field] the only way to accomplish this.

Can I use state_machine for this?

I have been trying to get this right for some time now. Any help would be great.

  • 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-22T19:05:42+00:00Added an answer on May 22, 2026 at 7:05 pm

    As no one answered this question, I am documenting the different approaches I have / am trying. But as I try more and more I am starting to dislike STI.

    1. Use booleans to specify if a requirement is a tender/lead/project. Added benefit of being able to tick more than one. A requirement can a Tender to start with then become a Lead and then a Project.

    2. Status field: HABTM. Can check one or more statuses. Again similar to 1 but added benefit of being able to add statuses.

    3. Has one: but this one seems non-dry. Haven’t tried. Adding as a theoretical option.
      Project has one Lead Or Project has one Tender.

    4. State-Machine: Seems like an interesting option. Not sure how I will be able to track the state changes. Can anybody with experience with State-Machine help me here?

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

Sidebar

Related Questions

I'm using Eclipse Ganymede to create a web application, but the project's currently just
We are currently using SVN to develop an internal application that has most of
My company is currently developing a project management web application in PHP, and I
I am responsible for a Delphi/Win32 project management application. I have just completed a
Our shop is in the process of converting our internal project management application from
I am working on a project management web application. The user has a variety
I need a Project management tool that works in Linux, and has Gantt charts.
Joel often talks about using MS Excel for lightweight project management, but I'm curious
For a current project, we're designing a client desktop application that parses text files
I am using Spring MVC for an application that involved a multilevel back end

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.