Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

Forum Replies Created

Viewing 15 replies - 61 through 75 (of 99 total)
  • Author
    Replies
  • in reply to: multiple dynamic relationships #33634

    jakabadambalazs
    Participant

    Hi @Soroka,

    (Here is the repo if you need to check something: repo)

    I think I am getting somewhere with this. I try to describe quickly what I have done because I have a question related to this.

    I now have a RelationshipBundle which is responsible for handling these synamic relationships.
    I have created a “central” entity called “ReferenceableElement” which has circular(self-referencing) ManyToMany relationship to itself:

    and each entity /account/contact/task/etc) has a OneToOne relationship to ReferenceableElement:

    The idea is that this way I have “abstracted” the ManyToMany relationships and I have a central element on which to create the relationships.

    For now I did not get to the point of implementing the selection/creation of the relations through the entities so I do in in the db table “mekit_ref_ref” and it works well.

    As you can see I have also implemented the “Relationship” config scope which is used to check if an entity is “referenceable” and some other options like which datagrid to use when listing related elements.

    To make long story short it seems that this model could work … do you have any observations? Do you see anything that in the long run could create problems?
    I have checked and even the query builder works when creating reports.

    Here is where I have the problem: As you can see the OneToOne relationship(and its getter/setter methods) is hard coded into the ReferenceableElement and today I got to the point where I wanted to extract it from there by creating and implementing a migration extension and by using the Oro\Bundle\EntityExtendBundle\Migration\Extension\ExtendExtension create the OneToOne relationship.

    The problem is that ExtendExtension does NOT have an addOneToOneRelation method.

    Q) Is there a reason why it is not there? Or better, is it not there because nobody has thought it could be necessary or is it because of some particular problem?

    thanks
    \a


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: @Config annotation – custom defaultValue key #33603

    jakabadambalazs
    Participant

    Hi @ignat,

    The link you gave me above does not expain this key: “require_schema_update”

    what does it do/what is it for?
    Thanks
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: bundles.yml – load bundle only in dev environment #36840

    jakabadambalazs
    Participant

    Hi @Soroka,

    Nothing really important just some “playground” bundle where test stuff. I was just curious if it was implemented but if not don’t worry I just use the AppKernel to do this. I don’t think it is a feature worth implementing in the platform.

    thanks
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: multiple dynamic relationships #33632

    jakabadambalazs
    Participant

    Hi @Soroka,

    Yes, I do agree that relationships must be handled in a proper way and it should be the task of the specific bundle do do that.

    Let me try to think aloud to see if it makes sense (even to me). Let’s reason with activities first: Let’s stick to bundles: Accounts(A), Contacts(C), Emails(E), Tasks(T) and Calls(K).

    Use case: I have Account A1 with two contacts C1 and C2. I receive an email(E1) from C1 saying that he needs a price quote but that he wants to be called by phone beforehand on a specific date/time. So I register a phone call(K1) for that date to remind myself. After the phone call(K1) we agree that in 5 days I’d send him(C1) and to C2 an email(E2) what he requested. So I register this as a task(T1).

    What I’d like to see is:

    1) on Account A:
    a) list of emails exchanged with A and with C1 and with C2
    b) list of calls exchanged with A and with C1 and with C2
    c) list of tasks where A, C1, C2 are involved

    2) on Contact C1 (same for C2):
    a) list of emails exchanged with C1
    b) list of calls exchanged with C1
    c) list of tasks where C1 is involved

    3) on Email E1:
    a) list of Accounts and Contacts involved
    b) list of Calls(K1)
    c) list of Tasks(T1)

    4) on Call K1:
    a) list of Accounts and Contacts involved
    b) list of Emails involved – in this case E1
    c) list of Tasks(T1)

    5) on Task T1:
    a) list of Accounts and Contacts involved
    b) list of Emails (E1 and when I send E2 I want to reference this task)
    c) list of Calls (K1)

    Here we would have bi-directional manyToMany relationships in between all entities. The way you are constructing the ActivityBundle does/will do this between an Account/Contact and an activity but will NOT give the possibility to do this between activities themselves. That is: I will be able to see 5a) but not 5b) or 5c).

    Let’s look at Task T1:
    I think it would be important to be able to view a task (as well as a call) and have the situation at hand on one screen. That is:
    – see why this task exist (there was an mail(E1) requesting this)
    – see who this task involves (A1, C1, [C2])
    – see the story of this task(what has been done): calls(K1)

    So this would mean that an activity should be able to reference another activity.

    And to add some complexity to this ;) activities (especially tasks) should be self referencing as well: If I have the task T1, and for me to be able to make the price quote, I need to do other stuff like ask my supplier to do me a special price, I’d create a sub-task T2 connected to T1. And on T2 I could have calls, mails, etc.

    And I think this could/(should?) be extendable to future entities as well. If a create a PriceQuoteBundle with entity Pricequote to complete my task T1 I should:
    1) create Pricequote(PQ1)
    2) send email E2

    So when I create PQ1 I’d like to be able to reference the task T1 – so if some time from now I view that task I will be able to see the full story and from T1 I will be able to quickly jump to PQ1.

    And when I send E2, again I’d need to reference both T1 and PQ1 for the same reason.

    Does this make sense to you?


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: multiple dynamic relationships #33630

    jakabadambalazs
    Participant

    Thanks @Soroka,
    Yes I looked into it yesterday. Some questions:

    1) when you say “…show all activity relations on the activity record level…” – you mean show on the task view the list of all accounts (ie. the relationship from the the inverse side)?

    2) for now (i am on platform 1.4.x-dev) when I do $activityExtension->addActivityAssociation($schema, 'my_activity_entity', 'my_target_entity'); I see that in the “EX_” Extend class extended by “my_activity_entity” I have the property and the methods to manage this relationship (this is the owning side I guess as far as ORM goes) but not on the other side. So, these relationships are not ManyToMany Bidirectional? Is this what you are working on?

    I’ll definitely look into the dev-master branch because I think this is a crucial point of the platform. And maybe I can help out if not with code with ideas.

    For me, the way I see CRM applications in general, is that there should be the possibility to “relate” any entity to others (the main entities like accounts, contacts, tasks etc – exactly the way you are doing this) – and now you are doing this with ActivityBundle because you are concentrating on ‘activities’ but let’s say tomorrow I will add a DomainBundle to be able track domain expiry dates/passwords/etc – and I’d have to declare my “domain” entity as an activity.
    From what I understand so far, it should work (with the enhancements you are working on now) just like the other activities. Maybe the only thing that is a bit strange is that it would not be an activity. What I am trying to say is that maybe the naming “ActivityBundle” and the concept of “activity” could be a bit awkward in the future – maybe “RelationshipBundle” and ‘relationship’ concept, being more generic, would fit better. But hey! I can live with it.


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Datagrid – filters – query_builder #35906

    jakabadambalazs
    Participant

    Thanks, I have checked on SystemAwareResolver but suddenly (as many times before it has happened to me with Sf) I realized that I was over-complicating something that is quite simple really.

    I have injected my ListItemRepository into the ‘helper’ service:

    and I modified the above method with a ‘very ugly’ but functional version:

    and now I can use it from datagrid.yml like this:

    The thing is ‘ugly’ because I did not have time to create a specific type for this so I am using the ‘entity’ type and I am (improperly) relying on the ‘attr’ property.

    but it works – just needs some polishing up

    Thanks anyways. As for allowing to pass parameters to method call I would not know where to start – for now I am just getting a taste of OroPlatform and for me it seems a task bigger than my present capabilities.

    Thanks for your help
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Custom entity on Calendar #35917

    jakabadambalazs
    Participant

    Thanks a lot @asmaga!


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Custom entity on Calendar #35915

    jakabadambalazs
    Participant

    not very popular ;)
    anyone?


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: User can choose their own language #36727

    jakabadambalazs
    Participant

    +1 for this


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: datagrid.yml – pass parameters to template #33608

    jakabadambalazs
    Participant

    Tnx, very useful.


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Removing Ownership from entity #35913

    jakabadambalazs
    Participant

    Hi,

    I have actually managed to do this by removing the entire scope “ownership” from the entity config by issuing:

    folowed by:

    this seems to be working
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: @Config annotation – custom defaultValue key #33602

    jakabadambalazs
    Participant

    I just got around to do this. WOW! This is very cool!


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: datagrid.yml – pass parameters to template #33606

    jakabadambalazs
    Participant

    Thanks @ignat – it works ;)!


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: @Config annotation – custom defaultValue key #33601

    jakabadambalazs
    Participant

    Thanks @ignat!


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: entity Config values #35910

    jakabadambalazs
    Participant

    Don’t worry I have found it (I should stop posting without looking ;))

    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

Viewing 15 replies - 61 through 75 (of 99 total)
Back to top

You will be redirected to [title]. Would you like to continue?

Yes No

You will be redirected to [title]. Would you like to continue?

Yes No