I am working on courts projects. where 2 parties are involved. One party who filed the case against second party. each party may have more than 1 advocate for represent his case. and one advocate has more than 1 case. This situation is the many to many relationship. i designed this structure, this is the rough example.
How can i define such relationship in doctrine 2. I tried this
Advocate:
/**
* #ORM\ManyToMany(targetEntity="CaseLaw\CaseLaw\Entity\CaseLaw", mappedBy="caseLawFirstPartyAdvocates")
**/
private $caseLaw;
CaseLaw
/**
* #ORM\ManyToMany(targetEntity="CaseLaw\Advocates\Entity\Advocates", inversedBy="caseLaw")
* #ORM\JoinTable(name="case_law_first_party_advocates",
* joinColumns={#ORM\JoinColumn(name="case_law_id", referencedColumnName="case_law_id")},
* inverseJoinColumns={#ORM\JoinColumn(name="advocate_id", referencedColumnName="advocate_id")})
**/
private $caseLawFirstPartyAdvocates;
/**
* #ORM\ManyToMany(targetEntity = "Advocates", inversedBy="caseLaw")
* #ORM\JoinTable(name="case_law_first_party_advocates",
* joinColumns={#ORM\JoinColumn(name="case_law_id", referencedColumnName="case_law_id")},
* inverseJoinColumns={#ORM\JoinColumn(name="advocate_id", referencedColumnName="advocate_id")})
**/
private $caseLawSecondPartyAdovcates;
The Problem is, Value of MappedBy attribute is caseLawFirstPartyAdvocates, where i can specify second attribute caseLawsecondPartyAdvocates ?. how can i define annotation of this kink of situation ?
I don't have a direct answer to your question, but I'm going to recommend that you try http://www.orm-designer.com to help you figure it out. It's not free, but the developer is very active with updates, and us very responsive to suggestions and to support questions.
Related
Hello and thank you for reading.
I want to ask whether it is possible to add your own header in description of a method. I can not find any answer anywhere.
Lets say:
/**
* #brief Adds a Character to a container. That monster will be updated and drawn. The monster is not added if monster with samee ID exists
* #param m Character to add
* #return false if the character was not added.
*/
bool AddZombie(Zombie * m);
Now this will in doxygen create a field with bold headers saying "Parameters" and "Returns".
What I want, however, is to add a paragraph for a complexity. The following code does not do what I want, however
/**
* #brief Adds a Character to a container. That monster will be updated and drawn. The monster is not added if monster with samee ID exists
* #param m Character to add
* #return false if the character was not added.
* #complexity The complexity is O(n)
*/
bool AddZombie(Zombie * m);
Now is there any way to do this?
When I am asking here, please allow me to ask one small little question:
Would it be possible to make a list of all complexities of methods, maybe sorted? Meaning not by coding html, by only using doxygen.
This might seem like a stupid question to people who know alot about doxygen, but, allthough I red documentation and the website, I still sometimes learn something new and hidden I did not know.
Thank you all for any response.
Have a nice day, and thank you for your time
Say I have some features of a person and then i perform google search.
A list of results display I want to mine those results and check how the contents of those results are relevant to that particular person.
If you need to perform a Google search, the relevancy is best computed using
relevancy = cos(x) * (sqrt(x) + atan2(x,y)) * sin(0)
This is the universal formula for relevancy. You can apply it to people or to questions on SO.
Trying to model an 'manufacturing plant' software system...
At the core of the entire system is the "workorder" -- almost every entity (many of those are not shown here or part of the AR in question) is somehow connected to it. Primarily however it looks like:
+ WorkOrder_Root
+ TrackingID: Property (UID)
+ DateReceived: Property
+ DateApproved: Property
+ PartName: Property
+ PartNumber: Property
+ Rework: Collection (1:m)
+ SerialLog: Collection (1:m)
+ CeriLog: Collection (1:m)
+ Sequences: Collection (1:m)
+ Dimensions: Collection (1:m)
+ Consumables: Collection (1:m)
+ Quoting: Single
+ Invoice: Single
+ Warranty: Single
+ Certification: Single
This is a massive AR (incomplete -- there are more properties/collections. Having read several more articles and mini-books in the last few days I am seriously wondering whether I should try and decompose into more AR.
http://www.sapiensworks.com/blog/post/2013/05/13/7-Biggest-Pitfalls-When-Doing-Domain-Driven-Design.aspx
http://www.sapiensworks.com/blog/post/2012/04/18/DDD-Aggregates-And-Aggregates-Root-Explained.aspx
All the above collections are collection of entities but none of which make sense outside the context of the work order.
You cannot invoice without a work order, you cannot quote without a work order, everything relies on a work order.
My primary concern is what I understand to be potential concurrency issues. For example, if someone is working on W/O: 66354 changing the quote and someone else is adding a rework, there exists something of a race condition.
Reworks can change the price, so quoting before a rework has completed, makes me think, perhaps rework should be it's own AR -- but all reworks belong to a work order, you cannot construct a rework without first opening/loading a WorkOrder.
All my other AR's in the model are relatively simple at most 3 child entities and few properties, but the work order is a beast and i'm wonder what type of issues I might expect by having this "God" object???
EDIT: I just read through the following
(http://practical-ddd.blogspot.ca/2012/07/designing-aggregates.html)
Invariants made me think twice. If a sequence can be updated or
changed without needing to inform the work order in which it is
associated, then sequences is a candidate for AR??? Sequences may be
a bad example as changes to the sequences do need to be reflected in
the WorkOrder_Root...but still...am I on the right path here? Letting
the business rules (rather than logical or data-centric organization
guide the path?)...
Regards,
Alex
Aggregates should certainly not be as big as you pointed out. The objects contained in an aggregate should have high coupling and share some invariants that must be met all the time. Invariants between aggregates are only eventually consistent. You can not rely on them as valid all the time. I could imagine that you can safely guard against such inconsistencies as you described with a 2 step process. First check the preconditions. Do the changes. Check again if everything is fine. If not undo your changes and start over again. If you have changes that should trigger something else use domain events. With them you can loosely couple some processes.
We’re using JCo 3.0 to connect to RFCs and read data from SAP R/3. We use one RFC RFC_READ_TABLE often and use a second custom RFC to read employee information. My questions revolve around a third RFC RSAQ_REMOTE_QUERY_CALL. I'm calling an ad-hoc query I built in SAP using this RFC but I’m not getting the expected results. The main problem is that it appears that SAP is ignoring one of my selection criteria and using what was saved in SAP when I originally built it. The date criterion stored in my ad-hoc is 6/23/2013. If I pass in 6/28/2013 from JCo, I get the same results as if I had passed 6/23/2013 from JCo.
We have built several ad-hoc queries whose only criteria is a personnel number and call them successfully using RFC RSAQ_REMOTE_QUERY_CALL.
Background on my ad-hoc query: reporting period of today, joining together four aspects of an employee’s information: their latest action (hire, rehire, etc.), organization (e.g. company), pay (e.g. pay scale level) and communication (e.g. email). The query will run every workday.
Here are my questions:
My ad-hoc has three selection criteria. The first two are simple strings. The third is a date. The date will vary each time the query runs. We are referencing the first criteria using SP$00001, the second with SP$00002 and the third with SP$00003. The order of the criteria changes from the ad-hoc to SQ01 (what was SP$00001 in the ad-hoc is now SP$00003). Shouldn’t we reference them in the order defined in the ad-hoc (e.g. SP$00001)?
The two simple string selections are using OPTION “EQ”. The date criteria is using OPTION GT (greater than). Is “GT” correct?
We have some limited accessibility to SAP. Is there a way to see which SP$ parameters are mapped to which criteria?
If my ad-hoc was saved with five criteria but four of them never change when I call the ad-hoc from JCo, do I just need to set the value of the one or do I need to set the other four as well?
Do I have to call this ad-hoc using a variant (function.getImportParameterList().setValue(“VARIANT”, “VARIANT_NAME”))?
Does the Reporting Period have an impact on the date criteria? I have tried changing the Reporting Period to be PNPBEGDA = today and PNPENDDA = today and noticed no change.
Is there a way in SAP to get a “declaration” of your ad-hoc (name, inputs, outputs, criteria)? I have looked at JCoFunction.toXml() and JCoFunctionTemplate. These are good if you want to see something at runtime before it goes to SAP, but I’m looking for something I can use on the JCo end to help me write Java code that matches the ad-hoc.
I have looked at length on the web for answers to my questions and have not found anything that is useful. If there is anything which would help me, please let me know.
Thanks,
LM
Since I don't know much about SQnn, I won't be able to answer all of your questions...
I don't know, sorry.
It should be, at least it's the usual operator for greater than.
Yes - set an external breakpoint right inside the function module and trace its execution while performing the RFC call. Warning: At least basic ABAP knowledge required.
I don't know, sorry.
I don't know either, sorry.
That would depend on the query, I suspect...
JCo won't be able to help you out there - it doesn't know about queries, it only knows function modules. There might be other RSAQ_* function modules to get that information though.
I played with setting up a variant in SQ01 for my query. I added some settings in the variant that solved my problem and answered several of my questions in my post. The main thing I did was add a dynamically calculated date as part of my criteria. Here's how:
1. In SQ01, access menu "Go To" -> "Maintain Variants".
2. Choose your variant and in subobjects, choose "Attributes" and click "Change".
3. In the displayed list, find your date criterion.
4. Choose "D" in Selection Variable, choose a comparison option (mine was GT for greater than), and a "Name of a Variable" (really, this is the type of dynamic date calculation you need).
5. Go back to the Subobjects panel, choose "Values" and click "Change".
6. Enter any other criteria you need in the "Program selections" section.
7. Save the variant.
By doing this, I don't need to pass anything into the query from JCo. Also, SAP will automatically update the date criteria you entered in step #4 above.
So to to answer my questions from my original post:
1 and 4. It doesn't matter because I'm no longer passing anything in from JCo.
2. "GT" is Greater Than.
3 and 7. If anyone knows, I'd really like to find out.
5. Use the name you as it is in SAP (step #2 above).
6. I still don't know, but it's not holding me up.
I'm posting this in case anyone out there needs this type of information. Thanks to Esti and vwegert for helping me out.
I am trying to use the Redmine wiki and I am having a hard time figuring out how to make the text not look so big. Here is a sample of the markup I am doing. Any suggestions on how to make the text not looks so big.
h1. Best Practices
==General==
* Detailed Names
==Python==
* Tabs Only (No space Indent)
* CapWord for classes
* lower_case_with_underscores for functions and variables
* UPPER_CASE_WITH_UNDERSCORES for Constants
After the heading h1 must be at least 1 empty line:
h1. Best Practices
==General==
* Detailed Names
==Python==
* Tabs Only (No space Indent)
* CapWord for classes
* lower_case_with_underscores for functions and variables
* UPPER_CASE_WITH_UNDERSCORES for Constants