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

  • SEARCH
  • Home
  • 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 8264171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:21:39+00:00 2026-06-08T04:21:39+00:00

I am totally confused with the object oriented inheritance things I have this scenario

  • 0

I am totally confused with the object oriented inheritance things

I have this scenario

Class User

Then

Class Employee extends User attributes username, password

then

Class Owners extend User

Each class has different attributes

Now all the login details will be in User table.

But i am confused that suppose

  1. If i use class User for authentication and Employee logs in, then the object i will be having is of type User not employee

  2. How will i get access to the attributes of Employee from that User object. If iclick on edit then how will employee details gets loaded

  • 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-06-08T04:21:40+00:00Added an answer on June 8, 2026 at 4:21 am

    You need to use some kind of inheritance (single table or multi table, doctrine should return the correct type, even if you query on the normal User entity), and have each object return different roles depending on their type (if you want to limit their access).

    https://github.com/netmeansnet/NmnMultiUserBundle this can proberly be inspirational.

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

Sidebar

Related Questions

Totally confused by this one... We have a WAMPServer installation set up, running a
Okay I'm totally confused on this one. I have a script that receives a
Totally confused about the data types required here. I have this Linq statement: var
I'm totally confused and have no idea how to do this, so please forgive
I am totally confused between Node object and Element object. document.getElementById() returns Element object
Totally confused here. I have a PARENT UIViewController that needs to pass an NSMutableArray
I am totally confused between WCF and ASMX web services. I have used a
I'm totally confused on this matter, some say use tables and others say it's
Totally new to programming so kindly excuse the silly question. I have this URL
Ok, I am asking this question because I am totally confused. I used to

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.