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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:10:14+00:00 2026-05-26T06:10:14+00:00

I am currently learning how to use the symfony2 framework. Going through the cook

  • 0

I am currently learning how to use the symfony2 framework.

Going through the cook book, I am starting to have a basic understanding of how everything fits together.

However, I have 2 questions regarding Entities, which I believe are models in the MVC pattern:

  • In the documentation, there seems to be a lot of talk about entities using doctrine as ORM. If I have an entity/model that does not require any ORM, is this still considered an “entity”?

  • In most tutorials I have seen, entities are often all thrown into a folder called “entities” under the application bundle. With many entities in an application, I feel that this can become quite messy and unorganized. How can I group and organize entities?

Cheers 🙂

  • 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-26T06:10:14+00:00Added an answer on May 26, 2026 at 6:10 am

    regarding your question how to organize your model classes:

    You may add Subfolders to “Entity” folder, then just follow that scructure in your namespace definition like:

    <?php
    
    namespace Acme\SampleBundle\Entity\Subfolder\EntityClass
    

    regarding your question to work without orm: that’s simple, just don’t use it.
    your classes will behave like “normal” classes do..

    But you will need some kind of interface to that, like EntityManager in Doctrine2, too.

    I would always prefer the use of ORM/ODM..

    That case I would just add a simple method to your entity class:

    <?php
    
    public function sendByEmail() {
    
    // Do stuff
    }
    

    You dont have to persist (save to DB) stuff at all. Note that in symfony1.4 there was a save() method on entities. In Symfony2 stuff is saved through $entityManager->persist($entity);

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

Sidebar

Related Questions

i am currently learning Zend Framework 1.10 and intend to use Doctrine 2. however
Hey. I'm currently learning to use MySql and have a couple of questions. 1)
I am a java programmer and currently learning antlr3. I have to use antlr
I am currently learning Assembly language on Linux. I have been using the book
I'm currently learning Windows programming through the Win32 API using Petzold's book as a
I am currently learning Spring. So far I have created a basic application consisting
I'm currently learning on how to use the Python optparse module. I'm trying the
I am currently learning the zsh and now I wanted to use strftime but
im currently learning python (in the very begining), so I still have some doubts
im currently learning stacks in java and have a quick question. what will the

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.