One-to-one two sided relationship causing two outer joins.

We have a fairly simple one-to-one relationship between two objects A and
B. A maps to table A, B maps to table B. A holds a foreign key to B. Both
classes hold a reference to each other.
What we are trying to achieve is to load both A and B with a single
intelligent SQL query. The only thing we can achieve is either two queries
or one query with two outer joins.
When both A and B have the other in the default fetch group and
EagerFetchMode set to join, Kodo dispatches is something like this:
SELECT whatever FROM A t0 LEFT OUTER JOIN B t1 ON t0.B_ID = t1.ID LEFT
OUTER JOIN A t2 ON t1.ID = t2.B_ID
The obvious problem with this is that is is going to be very innefficient.
Isn't the second join needed?
If the eager fetch mode is kept the same but A is removed from the default
fetch group of B then we get two queries. The first one is a left outer
join between A and B and loads all the columns from both A and B. (At this
point in a debugger, A holds a reference to B, but B's reference to A is
null). The second query fetchs all columns from B. But still the reference
to A is null. It's only when we actually navigate to A from a B that the
reference is populated. (Luckily no query is executed at this point).
Is there anyway to achieve the loading of both objects with a single SQL
query dispatched by Kodo?

You should be able to get what you want by querying for the B instance with A in
its default fetch group (but keeping B out of A's default fetch group). It
shoudl result in one query with a single outer join, and no additional queries
when you traverse the A.B relation.
The reason for the two joins/queries in other scenarios is that Kodo treats each
direction of the relation as a separate relation that has to be fetched on its
own. The reason the above solution should work is that when the A record is
read, the foreign key values for the B record are cached. When you traverse the
A.B relation after both A and B are loaded, Kodo matches these cached foreign
key values to the B instance in the PM cache and doesn't require a DB trip.

Similar Messages

  • Could any one tell me how to do the left outer join or right outer join?

    Could any one  tell me how to do the left outer join or right outer join in Webi Rich Client? thanks.

    we can do it in two ways
    1.  In  web intelligence level  on the query panel click the sql query and write the statement what ever u want there by modifying the existing statement.
    2.  In universe level select the fields in the two tables that you want to make join and create the join between two tables directly by joining field in table 1 to the field in the table 2 by drawing a line and double click on the line to view the join properties,then on join properties if we check the table 1 outer then it is left outer join if we check on table 2 outer then it will be the right outer join.after exporting the universe to the central sever we are now ready to use in web intelligence with out being changed anything in the sql query.
    endorse me if it is useful.
    thanks & regards
    Sreekanth.

  • EPSON Artisan 810 Two-Sided Print Option Grayed Out

    Hello,
    I have written a document in Pages and am attempting to print double sided using an EPSON Artison 810 all-in-one as I have used it in the past. The media type is set to plain paper/bright white paper, the paper size is US Letter (or 8.50x11.00) and Artisan 810 is the selected printer. As far as I can tell, the Two-Sided option should be working, however every time I try I get the following screen:
    Does anyone have advice on how to get this to work?

    Read your Epson user manual to see what it states regarding 2 sided printing & Mac OS.  Reason for this is because I have an Epson XP 400 which also allows for 2 sided printing.  Yet, its user manual does state this option "may" not work on Mac OS.  I could never get it to work w/SL.

  • Two-sided printing option greyed-out HP OfficeJet 7500a

    Hi,
    Could anyone help me? I just bought a HP OfficeJet 7500a (which does support duplex printing) and I am unable to do two-sided printing as the dropdown menu (located in layout in the print screen) is greyed-out.
    Do I require a driver or anything like that?
    By the way I am running Mountain Lion Developer Preview if that matters.
    Thanks in advance.
    Loic

    Loic Verrall wrote:
    Hi,
    Could anyone help me? I just bought a HP OfficeJet 7500a (which does support duplex printing) and I am unable to do two-sided printing as the dropdown menu (located in layout in the print screen) is greyed-out.
    Do I require a driver or anything like that?
    By the way I am running Mountain Lion Developer Preview if that matters.
    Thanks in advance.
    Loic
    You need to post in the Developer Forums, part of the terms you agreed to.

  • Two table sources - inner and outer join

    Hi All - thanks for your help in advance!
    I have factA inner joined to dimA on pkA. However, I also want the ability to see all of dimA even if there's no fact associated. I've aliased dimA to dimB. So, factA is inner joined to dimA (on pkA) and factA is also outer joined to dimB (on pkB).
    I want just one presentable table and one logical table. In my Logical table, I have dimA and dimB as the logical table sources. Both pkA and pkB are columns and each of the other attributes are mapped to both dimA and dimB.
    In my presentation layer, I have all the columns as well as both pkA and pkB. Depending if my analysis has pkA (inner) or pkB (outer), I want to be able to pull all the other attribute columns as well. Right now, even if I have pkB (outer) in the analysis, all the other attribute columns are still null. I don't want to have to have 2 presentation tables (one for inner and another for outer). Is this possible? Or maybe there's a better way to go at it?

    Hi All - thanks for your help in advance!
    I have factA inner joined to dimA on pkA. However, I also want the ability to see all of dimA even if there's no fact associated. I've aliased dimA to dimB. So, factA is inner joined to dimA (on pkA) and factA is also outer joined to dimB (on pkB).
    I want just one presentable table and one logical table. In my Logical table, I have dimA and dimB as the logical table sources. Both pkA and pkB are columns and each of the other attributes are mapped to both dimA and dimB.
    In my presentation layer, I have all the columns as well as both pkA and pkB. Depending if my analysis has pkA (inner) or pkB (outer), I want to be able to pull all the other attribute columns as well. Right now, even if I have pkB (outer) in the analysis, all the other attribute columns are still null. I don't want to have to have 2 presentation tables (one for inner and another for outer). Is this possible? Or maybe there's a better way to go at it?

  • Lexmark X4550 Double Printing/Two Sided/Duplex Printing Greyed Out

    Hey all,
    Been just over a week since I got my new MBP and while I can print wirelessly to my Lexmark printer, I can't get double sided printing to work - it's greyed out and unselectable.
    I've tried various help pages on Lexmark's website, I've got the latest drivers for Leopard but it hasn't helped - as for Lexmark's support...pfft! I think they're all sleeping at work; phones are never answered.
    It seems many people are experiencing the same on all various printer brands and someone had given a HP solution download but obviously it won't sort this LM printer out!
    Any ideas?
    Thanks!

    Just another idea... Could it be that the option is greyed out because the printer doesn't have an automatic duplexer?
    What I mean is that even when printing double sided from Windows, it would print a page and then I'd have to re-feed the page - so it's like manual double sided printing.
    If so, is there an option somewhere else for manual duplex?

  • HP LaserJet P1005 Two-sided printing not working on network

    Good day!
    I have a desktop, with Windowx XP, to which my LaserJet P1005 is connected via USB. My wife has a laptop, with the same Windows XP, from which she can print, but the two-sided option does not work right. She can check it and print, but the window to restart printing for the second side does not open and there is nothing we can do at this point.
    I have trie duninstalling the printer from both computers and reinstalling the newest drivers, it still won't work.
    Thanks for your help!

    I have an HP PhotoSmart 2575 All-in-One with the latest HP driver that displays the two-sided printing option greyed-out in the Layout window. According to HP, your printer must be capable of accepting an optional two-sided printer tray to work on a Mac. To me that is ludicrous since in Windows the driver supports manual two-sided printing.
    To get around this, I select the Paper Handling window and from the Pages to Print drop-down list select Odd only instead of the default All Pages. After clicking the print button the odd pages print starting with the last page and ending with the first. I then remove all paper and reinsert the printed pages with the top of the page facing the printer. First, though, I reorder the pages with the first page on the bottom and the last page on top. If the total number of pages is an odd number, I remove the last page from the inserted stack, as that is the very last printed page. I then select Even only from the Pages to Print drop-down list and click print again.
    Problem solved.

  • HP L7760 two-sided printing not working

    I have an HP Officejet Pro L7760 which does two-sided printing, or it did until I upgraded from 10.5.2 to 10.5.5. I have reset the printer system, downloaded & installed the latest printer software from HP. I called HP. I called Apple.
    I see the Apple website says the latest HP printer driver is 1.1.1. When I bring up Print & Fax, it says my printer driver is 2.3.1.
    Does anyone know how to get back the two sided printing? Which driver version is correct? Any thing I can try?

    I have an HP PhotoSmart 2575 All-in-One with the latest HP driver that displays the two-sided printing option greyed-out in the Layout window. According to HP, your printer must be capable of accepting an optional two-sided printer tray to work on a Mac. To me that is ludicrous since in Windows the driver supports manual two-sided printing.
    To get around this, I select the Paper Handling window and from the Pages to Print drop-down list select Odd only instead of the default All Pages. After clicking the print button the odd pages print starting with the last page and ending with the first. I then remove all paper and reinsert the printed pages with the top of the page facing the printer. First, though, I reorder the pages with the first page on the bottom and the last page on top. If the total number of pages is an odd number, I remove the last page from the inserted stack, as that is the very last printed page. I then select Even only from the Pages to Print drop-down list and click print again.
    Problem solved.

  • Problem with HP 1220c USB printer - two-sided print greyed-out

    My client has a Powerbook G4 550MHz with Tiger 10.4 installed and I installed the latest HP 1220c driver.
    When my client attempted to configure the printer via the printer setup page under 'layout' the two-sided print is greyed-out. Why?
    My client has admin rights.

    The layout of the print window is not the same as OS 9.x and prior. There will not be a choice for double sided printing as there was pre OS X unless the printer comes with an automatic duplexer.
    You will have to figure out how to print odds and evens in separate jobs and do it manually.
    Matt

  • Two-sided printing with Epson Workforce 630

    I bought a new iMac a few months ago and got the Epson WorkForce 630 printer at the same time. However, I can't figure out how to do duplex (two-sided) printing. I've searched around, and it looks like this feature may not be supported for the Mac. Now, why would Apple sell a printer through their website that doesn't support Mac? This seems like a basic feature that all printers should have.
    Does anyone know a work-around? The "two-sided" selection is grayed out for me.
    Thanks!

    Thanks! Unfortunately, on the Epson site, it says, "
    Q:
    Is manual duplex (double-sided) printing supported in Mac OS X with my product?
    A:
    No. This feature is supported in Windows only."
    I really don't know why Apple would sell a printer through their stores that doesn't support all features in their OS. I might end up going back to my older printer.

  • Two sided print option is grey out

    Recently, I noticed that when I need to print two-sided documents, the "two-sided" print option is greyed out.  I have gone into System Preferences  Printers & Scanners- and under "options" for the printer enabled the HP Two-sided Printing Accesory (Duplexer).  This button continues to disengage (won't remain enabled) and each time I need to print two-sided, I have to repeat the above process. Please help

    Hi,Try resetting the printing system and check if that may help:*Be aware that resetting the printer system will remove any existing print queue and reset any customized driver settings.
    Click the Apple menu, and then click System Preferences .
    Select Printers & Scanners.
    Right-click (or Ctrl + click) your product in the Printers list in the left panel, and then click Reset printing system .
    Click OK to confirm the reset.
    Type your user Name and Password .
    Click OK . The printing system resets. Next click the plus sign and select the listed printer. Within the Use drop down menu select the printer model and press the Add button. Hope that may help,Shlomi

  • How can I print two sided? Linux, Epson 845

    The "print two sided" box is greyed out. I am running Linux on an Epson Workforce 845. I have no problem on a Windows 7 machine.

    IMO, it's always a good idea to refer to
    [http://www.openprinting.org/printers/]
    and check if you really have the recommended driver installed. (But since you have Mint/Ubuntu/Debian it's as easy as installing epson-inkjet-printer-escpr, providing you any EPSON workforce... driver, directly in your package manager/software centre, then go to printers > install new.)
    BTW, Epson drivers are quite good; almost impossible that your Epson doesn't print "two-sided".

  • Two sided printing on HP DJ970cxi

    Hi all,
    I can't get my 970cxi drivers to let me set to duplex printing. I'm using the Gutenprint driver v5.1.3 but when I go to the print layout options the Two-sided option is 'greyed' out.
    The printer is connected to my broadband router so I print over IP from both a MacBook and MacMini.
    Any thoughts?
    thanks
    Steve

    OK, tried the fix posted here (http://discussions.apple.com/thread.jspa?threadID=1253482&start=45&tstart=0) and it works for my 970Cxi.
    First time round I didn't get it right - hadn't cleared out the old drivers properly (I put this down to being a Mac newbie...).
    Steve

  • How do I print two-sided using my iMac and Canon Pixma MX300?

    I have read several blogs regarding this and I still unsuccessful. I have gone to system preferences - Print & Scan - Options and Supplies - Driver -
    This gives me only "Print Using:" and the window reads Canon MX300 series (there are no other boxes on this page except "cancel" and "ok"
    If is move right and select Utility instead of Driver, it gives me nothing useful.
    I also have selected a document in Word then selected Print, then Layout and the Two-sided option is greyed out and I cannot select it.
    I see in some blogs that this is not supported by Canon in this menu but ???
    Any suggestions would be very appreciated!

    That device does not support duplexing according to it's system specifications.
    http://www.usa.canon.com/cusa/support/consumer/printers_multifunction/pixma_mx_s eries/pixma_mx300#Specifications

  • Left Outer Join with more than two tables in both CR 8.5 and XIR2

    I am trying to create a report and I have tried two versions of Crystal but I ultimately need the report in CR8.5 for compatibility with the client's system.  I think I am starting to figure out what might be wrong and it might be my understanding of SQL, but I can't see why someone hasn't needed this in the past. Ultimately I want to see all projects and any journal entry that might be posted for that project.
    Database is MySQL 5.0.38 and using MySQL ODBC driver 3.51.19.
    Project header table information will be populated. Each line item on a journal entry can be tagged with the project ID. But for me to pull the journal entry date I need also to link to a third table for the journal entry header info.
    I want to see all projects, whether a journal entry has been posted or not.
    So the links are like this
    ProjectHeader --->Left Outer Join ---> JELines ---> Inner Join ---> JEHeader
    I think in this scenerio Crystal is treating the LOJ as an IJ.
    I created two brand new reports today, one in CR8.5 and one in CR XIR2. Once I edited the automatic CR8.5 SQL statement (which I have been doing for years, usually without problem), they both ran properly. I linked customers to their invoices. Customers without invoices showed properly. But then I linked the invoices to the payments of the invoices and immediately lost customers without orders in both reports.
    So apparently only two tables are allowed in Outer Joins. Does this make sense?  I checked out the w3schools tutorial on SQL and it doesn't mention this limitation and I can't find anywhere else that it specifically indicates this but all samples of code I have seen only show two tables.  I just thought for presentation as a sample that was easiest to understand and we could expand as necessary.
    If this is correct, how does one go about accounting for this kind of thing?  One solution that goes through my mind is creating a view at the database level for the link between journal entry lines and journal entry headers.  Would this be a good solution under normal circumstances?
    A second option that I had to implement because of timelines, is to use a subreport linked to the main report through the project ID to pull the information for the journal entries and just pass the totals I need to the main report through a shared variable.
    These aren't normal circumstances because I don't have access to the database so I can't create the view.  I have come across this concept several times and I have been able to use subreports to solve it but I am trying to find a better solution for the future as sometimes subreports can be slow.  So are there any alternatives I have not considered here?
    TIA rasinc

    So after some more work and another post.  I was able to get this to work.
    Items disappear when linking to another table
    My issues were two fold.  I was selecting on the tables on the right-side of the original Inner Join.  However, I was checking for Nulls.  This apparently is correct but you must check for the Nulls first eg. (IsNull (JEHeader.Field1) OR JEHeader.Field1 <= 100).  I had my original statement reversed checking for <= 100 before checking for Nulls.
    I also did not set all links to be Left Outer Join.  I had the Inner Join.  I actually have about 6 tables in this report so all the links need to be set Outer Join.  So this now seems to be corrected.
    Thanks

Maybe you are looking for

  • I can't delete a more than 10 bookmarks at a time, I can't delete bookmarks folder

    Firefox 25, Mac 10.8 If I try to delete more than 10 bookmarks at a time or a folder with bookmarks in it, FF hangs, then says there's a script that isn't running properly & do I want to continue or stop the script - I've tried continuing but it just

  • How do I associate a protocol with Firefox?

    I can log in to Second Life but can't get to my location. It tells me that this application doesn't have a Firefox protocol. == URL of affected sites == http://http://maps.secondlife.com/index.php?q=http%3A%2F%2Fmaps.secondlife.com%2Fsecondlife%2Fche

  • Problem with special characters! Need a big help!

    Hello! Please be patient with me. English is not my main language. I have a big problem with my countries special chars. Our spec. chrs are á,é,í,ó,ö,ő,ú,ü,ű When I save a document every other characters (even other special chars) are okey, but ő and

  • Accidentally erased Contacts on iPhone: syncing problem

    I accidently synced my iPhone to a new laptop with no Contacts. This erased all Contacts from iPhone. With TM, I restored Contacts to new MBPro. How do I sync so that all Contacts come to iPhone rather than iPhone erasing MBPro Contacts?

  • Issues regarding the testing of the web dynpro abap service

    Hi all, I am working on web dynpro (ABAP). After activating the whole object. When I test the web dynpro service. The browser gives me the following error. The server <server_name> is taking too long to respond. I am new to Web Dynpro ABAP, can anyon