Interesting 1-1/1-M issue with dual keys

Let's say I have a table in my database called COMMENTS that holds comments made about many different kinds of entities in the database. That is, COMMENTS is a table that can be joined with several tables to get comments about that object. For example, I have 3 tables:
COMMENTS
id
objCode
objID
comment
USERS
id
objCode
name
ISSUES
id
objCode
name
With Data:
COMMENTS
1 USER 1 'my comment 1'
2 USER 1 'my comment 2'
3 USER 2 'my comment about a different user'
4 ISSU 1 'my comment about issue 1'
USERS
1 USER 'Bob'
2 USER 'Terry'
ISSUES
1 ISSU 'Important Issue'
So, I have a 1-M relationship between USERS-COMMENTS, and a 1-M relationship between USERS-ISSUES. This works fine.
The problem is in the 1-1 relationship from COMMENTS back to USERS and ISSUES. If I create a 1-1 relationship back on this table I get weird results...Let's focus solely on COMMENTS-USERS
I'm using addForeignKeyFieldName(String, String) on the OneToOneMapping twice to create the mapping from.
addForeignKeyFieldName("COMMENTS.OBJID", "USERS.ID");
addForeignKeyFieldName("COMMENTS.OBJCODE", "USERS.OBJCODE");
It is lazily retrieved. The PROBLEM IS THIS:
If I load up all my COMMENT objects and call "getUser()" on them, EVERY object retuns the USER than matches the "OBJID" value. That is, COMMENT 4 returns USER 1 rather than NULL (it is an ISSUE comment, not a USER comment).
I'm guessing this is related to the way ValueHolders know if there is a cache hit (probably uses the primary key of the object). However, I don't want to make ID/OBJCODE the primary key for USERS, I just want the ValueHolder to get it right on this read.
Is there a way for the ValueHolder in COMMENTS.getUsers() to recognize that a value of 1 for a ISSUE is different than a value of 1 for a USER?

Here is how TopLink will behave in this situation. When you issue the getUser() call, TopLink will take the expression stored in the value holder and check the cache based on the primary key* part of that expression. In you case, it will probably find a match. Then it will use the Mappings of the User object and compare the data in the mappings with the expression. This will not pass in your case, so a cache hit won't happen.
Then the SQL will be issued, and in your case nothing should get returned.
Is SQL getting logged? What type of mapping is you Object code on User being stored in? Is it something other than a direct to field?
*Note this is configurable.  You can set you queries to check by exact primary key, and avoid the cache hit unless the query contains nothing but the primary key.
Peter Krogh

Similar Messages

  • DVD Playback Issues with Dual Layer media

    I have been using DVDSP for years now, and have rarely had any issues with burning my final projects to DVD. Any playback issues have usually been issues with players and +or-R media.
    I have recently upgraded to a MacPro, and have been really stoked about being able to burn to Dual Layer media. My previous G5 didn't have a DL burner.
    I have a large project that fills most the disk, and everything seems great in the software, and when playing the media files on the computer. But when I burn to disk, I have huge issues with playback on different DVD players, computers, etc. I have stuttering with menu's, freezing, and stuttering with playback of video.
    I read that the issue could be because of the speed I'm burning at in DVDSP, so I saved as a disk image, and used disk utility to burn at a 4x speed. This seemed to help, but when I got to the end of the movie I had huge issues with stuttering/playback quality. So I burned another copy from the same disk image, and it wouldn't even play in my DVD player.
    When I open the Video_TS folder from the DVDSP Build, and play right off my hard drive in the DVD software player, I don't have any of these issues.
    So I'm guessing my problem is either my DVD media I'm using, or the burners on this new computer. I've burned DVD's on both burners (yes I have 2) and I still have the same problems.
    I am using Memorex DVD+R DL and they are 8x.
    Can anyone offer me some advice here. I really wish I could just hit burn and have a disk work. DL media isn't all that cheap and I don't know how many coasters I can make and keep my sanity.

    I used compressor and I used the DVD: Best Quality 90 Minutes setting. The bit rate is avg 6.2 and maximum 7.7. And yes I used ac3 audio.
    When you say lowest speeds possible... shouldn't a burner that says it burns at a speed work at that speed? I'm cool with burning at a lower speed to get this thing to work, but why have a burner that burns DVD DL at 8x speed, when it doesn't work? Shouldn't it work? Why is it that it won't work?
    If I get Verbatim DVD+R DL, can I burn at 8x speed with those?
    When I burn in disk utility I used the "varify burned data" and everything checks out ok. So why do I have this issue. Just curious.

  • Incompatibility issues with Dual Layer DVD+R  help?

    I think I've made a serious mistake in believing I could author a Dual layer dvd for replication and sale on my own. I've spent over 14 months on this film, which is working perfectly in Encore, complete with extensive menus and transitional movies.
    I've done my best to transcode the media in the most compatible way (keeping bitrate below 7mbps and using dolby digital audio format) BUT I'm still having bad luck with MOST dvd players.
    The DVD plays properly on my cheap sony player, but both my toshiba and humax/tivo players failed to read the disc. (multiple tries/burns....or coasters, now) I've read that there are common problems with dual layer +R.
    MY QUESTION IS: what is the BEST POSSIBLE WAY to author/burn this project for mass replication? Can I really achieve the result I'm looking for with Encore or will I have to give up and go to a professional authoring house with DLT capability?
    Will I get the best result by burning from encore straight to disc OR burning an image or folder, then using a third party burning program?
    Thanks SO MUCH for any responses. This process has been soul-crushing.

    >The DVD plays properly on my cheap sony player, but both my toshiba and humax/tivo players failed to read the disc. (multiple tries/burns....or coasters, now) I've read that there are common problems with dual layer +R.
    Marc, the only mistake I think you are making is in assuming that set top players can handle a written DVD+R DL disc.
    Support in older players is at best sketchy.
    If the disc is working properly in at least one player, then you should be good to go.
    Replication will produce a different type of disc. One that
    i will
    play properly.
    Not all burners support book typing, and unless you know what you're doing here do not use these "fudges". It's best using Plextor, and even Benq burners. The freeware utility IMGBurn has this ability, and it also tells you what burners do this. I've never needed it personally, as my Pioneer burners & Denon players have no trouble with +R DL media.
    What you really need is a player that you
    i know
    plays DVD+R DL discs properly. Once you know your player is good with the format, then all other inconsistencies are player related, not authoring, and not your problem. There is simply no way at all you can guarantee any form of compliance with +R DL media, as there is nothing in the specs that says any set top player has to read these discs. Or -R DL where support is generally even worse.
    Whilst most players will read -R single layer & +R single layer, again there is no mandatory requirement to do so.
    You will need to get these
    i replicated
    and not duplicated. Duplication (burning) will result in a lot of returns, and a lot of wasted money.

  • Issues with Fn-keys and Synaptics touchpad on Asus X51RL laptop

    Hello,
    Since I installed Arch on my laptop, it's been working great. But I still have a few issues:
    1) Fn-keys do not work. The brightness Fn-keys work, but I think that's done internally by the laptop, since it works even in the BIOS. The sound Fn-keys don't work, which is the ones I really need. How can I fix this? And I read somewhere that I have to switch from the kbd drivers to the evdev driver, is that true?
    2) Since the latest update to the synaptics package in testing, the touchpad lost one-touch tapping, along with some other stuff. I know the solution is to disable hotplugging, but I sometimes need to plug in a keyboard or mouse, so I can't. How can I retain the scrolling and one-touch tapping settings from Xorg.conf AND hotplugging while using the latest synaptics?
    3) The pre-configured options for the synaptics touchpad in the archwiki are good, but not that accurate. The size of the scrolling section of the touchpad is a bit too large, among other things. It's a minor problem compared to the others, but it'd be nice to fix it. In Windows, I definitely remember the settings being more accurate. Is there a way to have the Synaptics driver autodetect like the Windows one, or am I missing something here?
    Thanks a lot in advance!

    I have the S62J (Intel verified whatnot version) with this Asus, the brightness keys work. I think they are hard wired though as they work in the BIOS.
    I tried the acpi-support, but I haven't had any luck with it yet. I'll have to mess with it some more to see if I'm missing something.
    I'm also wondering if there isn't a different keyboard layout I should use. I notice that there is a 30-something-asus-something.fdi (I'm not on the notebook at the moment) on the system, but I don't know if it's being used by anything.
    The other observation is that using the Fn button is throwing ACPI calls into my dmesg.log file. I need to research to find out how to use them.

  • FF 8.0.1 Issue with cursor keys

    Hi,
    I encounter issue with using any of the keyboard cursor arrow keys (i.e. up/down/left/right, page up/dwn) in any textboxes on any websites that I open with FireFox.
    I made sure I have the latest mouse/keyboard drivers installed and I also checked the behaviour by openiung a web site using Internet Explorer where these sympthoms do not occur.
    When ever I enter any text and try to press arrow left/right the cursor didn't move. It only moves when I keep pressing the cursors key. The same happens by pressing Ctrl+arrow left/right or page down/up in multiline fields.
    Any advices are greatly appreciated.
    Thanks
    Bodo

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • [SOLVED] Fresh Install Error - Issue with PGP Key 4096R/753E0F1F

    Hello Guys,
    This is my first topic. I have done all the research in this forum and in Google for the issue, with no luck in finding a solution. I have done several Arch linux installs before on Virtual Machines and PC's all of them working properly, except for this one that I can not get to pass the install phase.
    Description of Hardware:
    HP Laptop Pavilion Entertainment PC dv2-1030us
    Athlon AMD Processor
    4 GB RAM
    300GB HD
    ATI Video Card
    Broadcom wireless Card (Default drivers Not Working)
    Wired Network Card (Working)
    I'm trying to install Arch from USB drive created from another arch machine via:
    sudo dd if=/name_of_file.iso of=/dev/sdX
    Using Arch Version:
    Current Release: 2014.08.01
    Included Kernel: 3.15.7
    ISO Size: 559.0 MB
    The above bootleable USB drive have been used to install Arch in another machine currently running it.
    After creating the partitions on the drive, namely:
    BOOT
    SWAP
    ROOT
    HOME
    And formatting them accordingly to the install guide, and having the system ready to download all the base and base-devel packages via:
    pacstrap -i /mnt base base-devel
    Right after it finishes downloading I get the following error:
    downloading required keys in keyring...
    :: Import PGP key 4096R/753E0F1F, "Anatol Pomozov <[email protected]>", created: 2014-02-04? [Y/n] y
    error: key "Anatol Pomozov <[email protected]>" could not be imported
    error: required key missing from keyring
    error: failed to commit transaction (unexpected error)
    Errors occurred, no packages were installed.
    ==> ERROR: Failed to install packages to new root
    I first ignored the error and then tried to proceed with the installation process and executed the following sequences of commands:
    genfstab -U -p /mnt >> /mnt/etc/fstab
    and then tried to chroot with:
    arch-chroot /mnt
    Then i got the following error:
    mount: mount point /mnt/etc/resolv.conf does not exist
    chroot: failed to run command "/bin/sh": No such file or directory
    Here is list of the Topics i Found in this forum that throw some light into the issue, some of the solutions I have tried with no luck at all:
    https://bbs.archlinux.org/viewtopic.php?id=185089
    https://bbs.archlinux.org/viewtopic.php?id=181057
    https://bbs.archlinux.org/viewtopic.php?id=178185
    I hope you can help find a direction where to start fixing this issue, since i feel pretty lost right now. By the way I'm a Newbie in the Arch Linux world, so there are a lot of thing that are not that obvious to me...
    Thank you in advance.
    Last edited by alejandroccs (2014-08-20 21:12:13)

    I've had the same issue with an (outdated) Arch Linux iso. As far as I am aware, it is caused by pacman's keys becoming out of date.
    I've managed to get around this before, but the exact method eludes me.
    You could try just updating the archlinux-keyring package, by refreshing pacman (pacman -Sy), then reinstalling only that package (try pacman -S archlinux-keyring).
    Then you should be able to continue as normal.
    Note that this only affects the CD filesystem in RAM - it will not persists across reboots using the CD.
    The reason why this might work is that the package archlinux-keyring might not be signed by the key you were having issues with. If it still fails, you could temporarily set the SigLevel for the core repo to 'Never', however this does disable package signing, at least until you reset the SigLevel.
    Unfortunately, I could not replicate the problem in a Qemu VM, so I'm not sure how good my method is. Hopefully, it fixes the problem.
    Here are some links that might help shed some light:
    http://calvinx.com/category/unix-linux/archlinux/
    https://wiki.archlinux.org/index.php/Pacman-key
    Hopefully this is helpful!
    pypi

  • Left shift issue with certain keys.

    Hello,
    From today, I have noticed an issue when using the right shift button, 
    It seems to only work with certain keys, the ones I have noticed do not work are ?  and :
    these works ok when using Left Shift
    Right shift works ok for other keys.

    Hi,
    Thanks for the reply, I dont have one with me at present,
    I find it strange, as I would normally agree with you but...
    The shift key works ok when used with other buttons indicating the shift key is ok.
    the ? and the : button work ok when no shift modifyer is present or when the shift key on the left hand side is used.
    proving both bottons work just not when used together

  • Screensaver issue with dual monitors

    My screensaver has recently started acting up. It's sort of a minor blip, but it worked before and now it won't. Here's the issue: I have dual monitors (Intel imac, running Leopard, with a Viewsonic 20" lcd running in extended desktop mode). I use a "smart" album from iphoto as a screensaver (iphoto 08, v7.1.5). I've been using this particular smart album for several months as my screensaver and it's worked fine. How it used to work: when the screensaver activates (either by time or by hot corner) both screens would draw photos from this album and randomly scroll, zoom, and fade them across each monitor, independently but simultaneously. It's worked like this flawlessly for years, with several different iphoto albums. Now, I just noticed that the second monitor does not find the pictures. A message on screen "looking for pictures" appears on both monitors, as normal, but instead of both monitors going to screensaver, only the imac starts, and the message "looking for pictures" stays on the other. What's weird is that if I run the screensaver in test mode, it works like it used to (both screens work independently and simultaneously). And if I switch to one of Apple's supplied screensavers, both screens work as well. But any iphoto album no longer works properly. I don't understand what has changed. I just recently ran an upgrade (Software Upgrade, a week or so ago) but it seems like it worked normally since then, and I don't believe the upgrade was a major one or had anything to do with iphoto. I just noticed this problem today. I've tried restarting the machine. Same issue. Any ideas what could be causing this minor, yet annoying, glitch.

    I had this same problem arise after installing an iPhoto update in late January. I contacted AppleCare and the problem was escalated to a Product Specialist. The Product Specialist contacted Apple Engineering and Engineering 1) replicated the problem and 2) confirmed that it's a bug.
    So, Apple is aware they have a bug and we look forward to a bug fix -- at some point in the future. I hoped the problem would be fixed with the next iPhoto update but a major update came out today and the problem remains. I don't know if there's any way to know whether the problem is an OS bug or an iPhoto bug but either way we have to wait until it reaches the top of the pile at Apple...

  • Routing issue with dual Ethernet NICs - Internal/External Configuration under Windows 8.1 - what am I doing wrong ?

    I have a PC hosting Windows 8.1, attached to two Networks. One leads to the internet - and uses the private IP address (172.*)  the other is purely internal (also using the private address 198.*) but,  has no internet connectivity.  I'm finding
    that if I don't disable my internal NIC, I can't access any internet sites. Is this a bug, or have I not done something correctly.
    I have also, a Windows 7 PC, attached to the same Networks, and it exhibits no issues when connecting to either the internet or to internal locations.
    (Both are Enterprise builds, though only across a Windows for Workgroups network).
    Can anyone tell me what I need to be doing with Windows 8.1 please, to make both internal & external network connectivity work as is the case with Windows 7 ?
    I'm only running IPv4, and both Wired Networks have at their respective ends, Routers that support DHCP & NAT. Though the internal Router's external port is not connected to anything.
    Thanks in advance...

    Hi,
    Can you tell me what you have tried so far and how did you set?
    Firstly please update all network adapter driver.
    After that, do the following:
    1. Open the Command Prompt (Admin).
    2. Run "Ipconfig /all" to check your nics IP information.
    3. Use route command tell the computer which interface you want the packets to leave from.
    Assuming Network A is...
    10.10.11.0 /24
    Router is 10.10.10.1
    and Network B is...
    10.10.12.0 /24
    Router is 10.10.10.2
    then use this command:
    route add 10.10.11.0 mask 255.255.255.0 10.10.10.1 -p
    route add 10.10.12.0 mask 255.255.255.0 10.10.10.2 -p
    Hope this helps.
    Karen Hu
    TechNet Community Support

  • Customer account statement has issue with dual currency.

    Hello Experts,
    As per your clients requirement we have modified the form for customer account statement for ETHIOPIA. 
    In the requirement we have asked to get the opening balance of the customer. For example we are running the report for the period 01.03.2010 to 31.05.2010. In this case client what us to display the balance up to 28.02.2010 as opening balance, where we are using the function module BAPI_AR_ACC_GETKEYDATEBALANCE to bring the opening balance.
    Know your issue is when we are doing this process the account ageing for opening balance is not getting displayed in the customer account statement. When we followed the standard functionally then it was working fine. But the issue comes when there is a dual currency for some of the customers where we are getting two accounts ageing for two different currencies. To void this we have taken the arrear field from FBL5N report as base so that we can have single account ageing, which was working fine. But in this process no account ageing is getting displayed for opening balance.
    Can someone help me on this issue?
    Thanks and Regards,
    Rajesh Kumar Mantri.

    Hi,
    Sorry we have done that and not successful in find the solution. Any other solution.
    Thanks and Regards,
    Rajesh Kumar Mantri.

  • CRM2011/3: Outlook CRM Cient Issues with Dual Domain (trusted forest)

    We currently have CRM2011 but are about to migrate to CRM2013 and then to CRM2015. We have a configuration issue that we not sure is supported and seek clarification from the community please.
    Our CRM deployment is working fine with the browser and Outlook CRM client on our single AD. Recently we have started allowing user within another AD to use our CRM. We have done this by setting up a bidirectional trust between the two domains.
    Users from the new domain can use CRM if we add their {domain}\{login} into the user entity by hand (the add multiple users feature cannot browser the trusted foreign domain).
    With the browser everything is fine, the new user from the foreign domain get straight in without needing to re-authenticate.
    However, we've not been able to install the Outlook CRM client for those users. Is this because they belong to another domain and the authentication is done differently to that of the browser.
    Is this scenario supported? Does it require Claims Authentication to get foreign Outlook User to connect?
    Any feedback gratefully received. 

  • Crashing issue with dual cards not in SLI mode

    Running CS6 on a HPZ820 with 64GB RAM and TWO Nividia Quadro4000s... having some crashing issues - DisplaySurface.dll error. I am NOT running cards in SLI mode. Any ideas? I have some NewBlueFX plug-ins that I disabled the GPU - that helped. But now it started crashing again with same error. System was built up to specs.
    Any advice?

    Does it crash if you remove one of the cards?

  • FCP 7, issue with dual display (video frozen but audio plays)

    I have just installed FCP 7 (Studio 3) onto a new MacPro 8-core with Radion5770 GFX card.
    Primary monitor is running via DVI, secondary monitor is running via DisplayPort to HDMI.
    My problem is that if i enable the secondary display so that I get a full screen image from the timeline and then attempt to play the video remains frozen whilst the audio plays.
    Its the same on the primary display video viewer window as well.
    If I TURN OFF the secondary display then the video viewer on the primary window returns to normal play back without any issues.
    If I turn the seconday display back on, then "scratch" along the timeline then the video refeshes corectly - but every time i hit play the video remains frozen.
    Any ideas???

    Ive found the solution.
    its quite easy.
    symply go to
    Final Cut Pro -> Audio/Video Settings
    Navigate to A/V Devices and under video select the screen your using. If your using the computers screen, like a macbooks screen make sure to check the box. "Miror on desktop". If you do not do this you will have a black frozen immage and the sound will continue playing.
    I set a shortcut for "All frames" so that when I press a cmd+p it automatically plays full screen on my macbook.
    Hope that helps.
    Sylvain Cruiziat
    http://www.vimeo.com/sylvaincruiziat

  • Full screen issues with dual monitors in safari.

    I have my 21 inch iMac connected to my 42" panasonic LCD TV. Up until recently I've been watching TV via my sling box back in the states. (I'm a soldier stationed in Germany). When I go to a full screen mode in Safari, I get full screen in my iMac and not the TV. Even when the window is in the TV. This never happened before, it's almost as if the iMac sees the TV but makes all full screen video available only on itself rather than where ever the window may be. Safari help tells me I can choose where I want full screen by swiping on the magic mouse, but I can't get it to work. How do I get my video to stay on my TV when I double click on the video instead of having it jump back to the iMac?

    Reading your post full screen mode is working as Apple intended it to. When you set full screen mode on an app that has the ability it makes it full screen on the Mac and any other monitor is left blank while viewing that app. Currently there are no adjustments to change this. I would recommend providing feedback to Apple at www.apple.com/feedback to let them know what you anticipated.

  • Activation issues with dual Adobe ID's

    I have one adobe id based in the US Adobe store that holds all my point product licenses.
    I was forced due to living in New Zealand to have my cloud subscription via the NZ store and had to have a new id.
    All is fine except every time I open one of my point products - on next opening a cloud product im forced to reactivate ( it tells me im running in trial mode and i have to click on license this product)
    This is easy to do but quite frustrating - I am in the position where i have to open cs5 and earlier versions to help students and customers so its happening to me daily or more often and that seems unreasonable.
    Is there anything that can be done to fix this situation???

    OK, thanks for the clarification.
    I was wondering if this might be related to what you are experencing
    http://helpx.adobe.com/creative-cloud/kb/creative-cloud-trial-mode.html
    Is the lanuage preference set to English (International)?
    -Dave

Maybe you are looking for