ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 5 replies, has 5 voices, and was last updated by  Alexander 1 year, 10 months ago.

  • Creator
    Topic
  • #6020
    Spurgeon
    Spurgeon
    Participant

    Hi,

    I created two custom entities – locality & seeker.

    I wish to use locality (which contains the name of the area and zip code) for each seeker as a prepopulated list.

    Instead of creating a many to one relation i created a one to many and deleted the incorrect implementation.

    I had used php app/console oro:migration:load –force to activate the entity changes (is this right?)

    then cleared dev & prod caches before checking for the changes.

    While the deleted field has gone in the grid / UI, when I attempt to create a new field, I get this exception.

    A model for “Extend\Entity\Locality::seeker_localityname” was not found

    in /var/www/crm-application/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Config/ConfigModelManager.php at line 223 –
    $model = $this->findFieldModel($className, $fieldName);
    if (!$model) {
    throw new RuntimeException(
    sprintf(‘A model for “%s::%s” was not found’, $className, $fieldName)
    );
    }

    Can someone pl help me with the error?

    Basically, we want include Locality (Area) and the corresponding Zip code for an address entity like how Countries / Regions appear.

    How to go about for this to be implemented easily?

    Thanks!
    Warm regards
    Spurgeon

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #6032

    Alexandr Smaga
    Participant

    Hello @spurgeonbj.

    In order to apply changes on entities that you did in UI, you have just to run red button “update schema”.

    You issue looks like entities metadata in DB is out of sync with real DB. Can you please try to clear cache and then run

    Unfortunately region and country field types are not implemented for adding from UI yet. You can include those field only on code level.

    #6033
    Spurgeon
    Spurgeon
    Participant

    Hi Alexandr,

    Greetings!

    Thanks for the kind info / details. Will check this out.

    Regarding region / country field types, we are happy how region / country fields work by default. But want to have similar drop downs for locality and zip code based on city. For example, If the chosen city is XYZ, we wish to display localities of city XYZ along with its zip code – assuming that the table with city, locality, zip fields is created and populated.

    Would it be possible to spell out the outline of tasks involved to achieve this?

    From oro_cookbook, I realise that this can be achieved by overriding AddressBundle.

    Can you pl throw some light on this process?

    warm regards and gratitude,
    Spurgeon

    #8987

    brunpatoch
    Participant

    Hi, I have exactly the same bug and “app/console oro:entity-config:update –force” command does not solve the problem. Do you have a solution?

    #11171

    peeush
    Participant

    Hi

    I am struggling with the same issue, but running “app/console oro:entity-config:update –force” command throws the following error:

    [ReflectionException]
    Property OroCRM\Bundle\SalesBundle\Entity\Opportunity::$trainingClasses does not exist

    Essentially, this command does not run because of the same issue i.e. missing model!

    Please advise!

    Thanks!

    #11829

    Alexander
    Participant

    Hi.

    I met same problem. After digging through the code, I have concluded there is a problem with field cache warmup process.
    I’ve created a patch (https://github.com/orocrm/platform/pull/278/files), maybe it doesn’t solve the root of the problem, but it removes “A model for “…” was not found” error.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.