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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:46:19+00:00 2026-05-25T01:46:19+00:00

I am working on a new application and I have a need to use

  • 0

I am working on a new application and I have a need to use an EAV
table style for a few different tables. Primarily the one I am posting
about is my users table. I need to use EAV so that custom user defined
fields can be added/displayed easily.

So far I have a simple table structure, I have a made an ERD for easy viewing.

The approach I am thinking about using is similar to this post on key value pairs.
A simple beforeSave() that matches up fields to the form name.

There is only one issue with this that I am seeing, since I am not storing
the field name(attribute_code from eav_attributes) with the value, how
would I go about matching up the form field with the attribute_code
and ultimately with the value the form field passed in?

  • 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-25T01:46:20+00:00Added an answer on May 25, 2026 at 1:46 am

    I think the approach in the blog is fine. Except instead of looping through the data array directly, you’d have to generate a list of the applicable EAV keys first since you’re storing the keys separately. You just need to check that it exists in the data array before setting it so you don’t set empty keys.

    Basically you’d use three models rather than two, since you need to take in to account the model managing the attribute labels.

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

Sidebar

Related Questions

Every time I start working on a new J2EE web application, I need to
We are currently working on a new version of our main application. one thing
I'm working on a new project, a web application, where I need to focus
I am working on wireframe for new feature in our application. One of the
I have been working on a new MVC application that utilizies EF4, POCO Domain
I have working web-application with applicationContext.xml in WEB-INF/config/applicationContext.xml. Now i need to implement some
I am working on a Spring web application where I have a need to
I have an application I'm working on, and I need the user to be
I have an application with tabs. In one tab I need to put data
My application is working 24X7 and I use DataTable for data handling. I need

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.