General Quesion Regarding ManyToOne

Hi ,
iam, using JPA/Toplink , i have a legacy Data Base and its rich of Assosiations , my question has 2 parts :
- If my Entity has a Compsite Key and one of the key members should be represented as Object of that Entity type (ManyToOne EGAR relation to retrive all the Descriptions once) , is this applicable and does not considered BAD design.
- If the answer for the first one is "YES" , how can i specify that the ManyToOne Assosiation to be considered as ID .
Thanks and Best Regards ,

This is a common model that a dependent object's primary key is composed in part by its foreign key to it owning object. Unfortunately the JPA Spec does not directly support this. In JPA you will need to create a basic attribute for the foreign key. You will also need to use an IdClass as the Entity has a composite primary key.
However you can do this through TopLink, but not through JPA annotations. You could use a DescriptorCustomizer to use the setPrimaryKeyFieldNames() of your ClassDescriptor to the composite fields.

Similar Messages

  • General Inquiry Regarding Error Handling with System Exec.vi

    I have a sub vi that uses the System Exec.vi to send SMS messages when triggered. I am confused as to how the error handling works and why all of the errors seem to go to the "standard error" vs the "Error out". The reason I am interested is because I am trying to interrupt the error out of another script to execute a command if error=true.
    I have intentionally created an error to test this, however it does not seem that the signal is ever being sent to the error out, only to the standard error.
    Any help/explanation as to how this works would be greatly appreciated.

    The Facebook discussion board is just a pilot and that functionality is not available yet (as to my knowledge). You will have to use the actual forum thread to add attachments. You can click the arrow just to the right of thread topic in the Facebook thread and that will take you to the ni.com/forums thread. Or you can navigate here:
    http://forums.ni.com/t5/LabVIEW/General-Inquiry-Regarding-Error-Handling-with-System-Exec-vi/m-p/246...
    Having a look at your VI would help to clarify the error handling issue.
    Daniel K | NI Applications Engineer | Certified LabVIEW Developer

  • General Question Regarding Image Processing

    Hi All,
    I need a suggestion regarding image processing and this is the best place to get best advise.
    we need an image processing utility for our web processing.
    requirements are as described below:
    we have a e commerce based application where we need to display product images which we are currently displaying successfully.
    now we have to provide user with image processing functionality like user can zoom image can flip image can rotate image.
    what we want like when user click on zoom we can generate a dynamic image of that region based on a single source of image and can provide zooming functionality.
    more over company requirements is to go for only open source solution [:-)]
    we tried some open source solutions but due to the in house E-Commerce framework constraints we not able to integrate them,.
    can any one point me to any open source java based library so that we can use that to provide solution or do we need some other approach.
    Here is a link for a image zooming example hough this is highly professional solution using Adobe Scene7 but we want to implement something like in image zooming
    [Zoom Demo|http://s7d2.scene7.com/s7ondemand/zoom/flasht_zoom.jsp?company=S7Web&sku=AnthroISwebDemo&config=S7Web/AnthroISwebDemo&zoomwidth=500&zoomheight=500&viewer=/skins/S7Web/SWFs/loaders/genericzoomLfour.swf&vc=codeRoot%3D%2Fis-viewers351%2Fflash%2F]
    any help in this regard will be much appreciated.
    Thanks in advance
    -Umesh

    It is never safe to assume that any allocation was successful, and while it's incredibly unlikely that you're running into any such situation, it's entirely possible for a formal protocol to declare that a given message send should return immediately without waiting around:
    http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ch apter13_section_8.html#//appleref/doc/uid/TP30001163-CH9-BAJIGHAF
    An "impression" doesn't prove much unfortunately, so I'd recommend getting friendly with the debugger to see what's really going on.

  • General query regarding the implementation of a Flash Streaming Server

    Hey lads,
    I'm looking at setting up an Adobe Flash Streaming Server at
    work. It will be used primarily to stream training videos across
    our Intranet - we have ~1000 users at the moment, with the capacity
    to expand to ~2000). We are looking at both filming with a camera
    and screencasting (using either
    Camtasia or Adobe
    Captivate) and then encoding to .FLV
    Camtasia can encode directly to FLV, however I'm not too sure
    of the quality, so the Adobe Flash Media Live Encoder looks like a
    good option too. For the time being we will just be concentrating
    on the screencasting though.
    The good thing is i can download a development server for
    free from Adobe which gives me complete access with just a
    restriction on the amount of users that can access the content
    (10).
    From what i can gather the (simple) way it works (and that
    I want it to work) is that you have a standard template SWF
    file containing relevant actionscript (sitting in most probably in
    a html/php/asp/ect file on the webserver), which then calls the FLV
    file from the flash server and streams the content to the clients
    PC. I assume i will pass a variable to the SWF file (the video ID i
    want), and that will then be used to call the corresponding FLV
    file.
    So effectively a YouTube website, i.e:
    watch?
    v=WjK6wNIWzts
    I just wanted to know if anyone had any general tips on how i
    should approach this? Obviously quality vs file size will be a big
    point - deciding on a standard FLV format will be a mission,
    however i do have the benefit of an internal network so can anyone
    recommend some good encoding tips? I was actually thinking of
    encoding a low quality and high quality version, but i don't think
    that's really sustainable/effective.
    There is a bit of documentation around for this, but they
    tend not to answer the basic questions. Am i heading in the right
    direction?
    Thanks for your help :)

    If you are not able to find older version of connector on Metalink then raise an SR with Oracle and give proper Business Justification for the same.

  • What's the general consensus regarding Generics in Java?

    Just curious what folks think about how it's implemented in Java and whether you're in favor of it or not (not that it will make any difference).
    I haven't been using it yet because I am still working on 1.4.x, but I've been familiarizing myself as best as I can with how to use them.
    I realize they fill an important need, but I am not convinced they were/are worth the rather steep price paid for readability.
    Curious to get others opinions on this. Regards,
    ~Bill
    Message was edited by:
    abillconsl

    So "new MyWrapper(aString)" is untyped, we need to
    use "new MyWrapper<String>(aString)" whichviolates
    the principle of Dont-repeat-yourself.I don't think so... what if I wanted to create
    something like this?
    new MyWrapper<Number>(new Integer(4))That's still possible. My problem is that it works exactly as I'd like it to work as long as I call a method, but not when I instanciate a new object. Let's assume for a second that MyWrapper has a static generic method createWrapper() that just calls the constructor:
    public class MyWrapper<T> {
         private T foo;
         public MyWrapper(T foo) {
              this.foo = foo;
         public T getFoo() {
              return foo;
         public static <WT,VT extends WT> MyWrapper<WT> createWrapper(VT foo) {
              return new MyWrapper<WT>(foo);
    }Here WT is the generic type of the returned wrapper (WrapperType) and VT is the type of the value(ValueType).
    Now we see a strange discrepancy on how the object instanciation ("call of a constructor", so to speak) works and how calling another Method works:
    MyWrapper<Integer> i1 = new MyWrapper(Integer.valueOf(1)); //unsafe, not infered
    MyWrapper<Integer> i2 = MyWrapper.createWrapper(Integer.valueOf(1)); //ok, everything fine
    MyWrapper<Number> n1 = new MyWrapper(Integer.valueOf(1)); //unsafe, not infered
    MyWrapper<Number> n2 = MyWrapper.createWrapper(Integer.valueOf(1)); //ok, everything fineIf you compile this code (or simply paste it in any modern IDE) you'll see that you'll get warning in the two lines calling the constructor. While the lines calling createWrapper() seem ok. So somehow the compiler can infer the type information when calling a method but can't do that when calling a constructor. That's what's troubling me.

  • General queries regarding explain plan and query

    Hello Oracle buddies,
    I have few badly formed queries with plenty of nested loops, merge join cartesian , plenty of sorting and in the query so many sub queries and all.. The cost of the queries are high like anything.
    some even has 130Crore of cost .
    When I got the chance to look into those quries I test them in Non Prod systems and which almost have 90-95% similar data as it was refresh by PROD few weeks back.
    I found few queries are having the same explain plan but cost is less like anything. for example 5000 or 6000.
    When I check for the possibilities of wrong statistics I found they just collect with default setting...
    In Non prod I saw only the auto stat job is ran and most of the tables are having the stats which are of last analyzed on the day of refresh.
    Now what could be so differentiating factor that drives a queries' cost lesser than Prod systems, when the data is almost same. Also if prod ssystem is gather by only gather_schema_stat('SCHEMA_NAME') then it should carry the same stat in non prod while refreshing. I know ppl do not gather stat on test only auto job is running ...
    I need to have clear prove before I can have a clear understanding..
    Please help me to know what factors could be differentiating?
    -Regards,
    J_DBA_Sourav

    j_DBA_sourav wrote:
    Hello Jonathan,
    Thanks for the reply. The team refreshed it, by expdp/impdp method where by default statistics are included. In that case?
    Is this problem probable to happen due to statistics only or anything else is also responsible. Even the explain plan is same.
    Please through some light on it.
    Auto job is on as I stated earlier but in test systems most of the tables are showing refreshed date as last_analyzed
    -Regards
    JDS
    Anything that puts the stats out of sync with each other may be sufficient to cause problems. Any queries that depend on sysdate may cause a problem.
    As a simple check:  select table_name, last_analyzed from user_tables on the two systems, with some order by clause (e.g. table_name), and see how many tables were analysed at different times - anything on either system after the exp/imp could be part of your problem.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    Now on Twitter: @jloracle

  • JSF general query regarding UISelectItem and UISelectItems

    I am seeing a couple of peculiar behavior and i have no explanation for them at the moment . It would be great if someone can explain the apparently different behavior of JSF in general.
    Whenever there is 'n' number of UISelectItem components inside a UISelectOne component , the getter method of the property of the backing bean to which the UISelectOne component's value is bound is getting called "n" number of times when the page is rendered.
    Whenever there is a single UISelectItems component inside a parent UIselectOne component , the getter method of the property(in my case a List of SelectItem components) of the backing bean to which the UISelectItems component's value is bound is getting called "2" times when the page is rendered.
    The pattern is same for the first time when the page is requested and for any subsequent requests for the page.
    What might be the possible reason for the afore mentioned behaviors of JSF?

    Getters and setters will be called different times in different Lifecycle phases.
    This may help... http://www-128.ibm.com/developerworks/java/library/j-jsf2/
    in particular, Select Components have some validation checks that loop over the items in the select component - I believe basically it loops over the selectItems and makes sure the selectItem.value "type" is the same as the selectComponent.value "type"
    Also... I just posted this to another thread....
    I found adding a Phase Listener with debug logging has helped enourmously with seeing when getter and setters were called in which phase.
    public class DebugPhaseListener implements PhaseListener {
        private static final Log LOGGER = LogFactory.getLog(DebugPhaseListener.class);
        public PhaseId getPhaseId() {
            return PhaseId.ANY_PHASE;
        public void beforePhase(PhaseEvent event) {
            LOGGER.debug("beforePhase(" + event.getPhaseId() + ")");
        public void afterPhase(PhaseEvent event) {
            LOGGER.debug("afterPhase(" + event.getPhaseId() + ")");
    in your faces-config.xml... add
    <lifecycle>
    <phase-listener>com.mycompany.DebugPhaseListener</phase-listener>
    </lifecycle>

  • General question regarding environment files in APPL_TOP

    Hi. I will be passing my OCP (hopefully) next month and I am now turning my head to teh Applications side since my job involves a lot of Oracle Financials.
    I just did a clean installation of 11.5.10.2 but at the level of seeting environment files, my boss swooped in and did them all. I would love to know which ones need changing, or even which ones do what ...
    I am using the Oracle doc Re: Generate the Database Context File
    to follow with, but what I see before me in our own (9i, AIX 5.2) set up doesnt always mirror what the doc says.
    I need some general information about these env. files. In our <ORA>APPL directory we have the following env. files:
    APPSORA.env
    DEV.env
    DEV_davidcl.env
    APPSDEV_davidcl.env
    DAVIDCUST.env (I have changed our firm's name to David)
    In the doc, it explains that there is a "main applications env file", and a consolidated applications file". <CONTEXT_NAME>.env and APPS<CONTEXT_NAME>.env respectively. Which ones are those in my directory listing?
    I have also checked in the .profile of the appcldev and the appdbdev users, and they both point to the same two environment files -
    $APPL_TOP/DAVIDCUST.env
    and
    $APPL_TOP/APPSORA.env
    Sorry this is a bit scrambled message - is there any other source out there to explain environment files?
    Thanks
    DA

    Thanks - they are the same! That's why the DEV_davidcl.env has all the parameters that according to the doc APPDDEV_davidcl.env should have.
    Thanks - very helpful. The DBA here never has any time to explain this stuff, since I think he's been doing it for so long that he doenst understand why anyone would not know it too. Its very hard working for him sometimes since nothing is explained.
    All of my questions are stemming from this clean installation of 11.5.2 that I have done.
    I am still wondering about the .profiles of each user we have on the system though. I understand that we had to copy the profiles from TEST to this, our DEV side, then we edited the profiles to match the DEV parameters. Fine.....but the actual .env files themselves - I am looking at them and dont understand at all.
    Each .profile and each user are as follows:
    appdbdev:
    appdbdev@TEST:more .profile
    APPL_TOP=/oradbi3/oracle/testappl;export APPL_TOP
    . $APPL_TOP/DAVIDCUST.env
    . $APPL_TOP/APPSORA.env
    appcldev:
    appcldev@TEST:more .profile
    APPL_TOP=/oracli3/oracle/devappl;export APPL_TOP
    . $APPL_TOP/DAVIDCUST.env
    . $APPL_TOP/APPSORA.env
    So these two, both on the cl node, appear to be pointing to same env files.
    Then comes the db node:
    oradbdev:
    oradbdev@TEST:more .profile
    . /oradbi3/oracle/devdb/9.2.0/DEV_daviddb.env
    . /oradbi3/oracle/devappl/DAVIDCUST.env
    I think I can understand the .env that are pointed to on the cl node, but I dont understand the oradbdev .profile, since its pointing to oradbi3/oracledevdb for one env file, then oradbi3/oracle/devappl for another.
    I asked our DBA about this, and he said "dont worry about it". I have to try and run the script to start the application server this morning, but every time I try to su to the db node user I get this:
    doralcl:/> su - appdbdev
    .profile[2]: /oradbi3/oracle/devappl/DAVIDCUST.env: not found.
    Like I mentioned, I pinted this out to our DBA and he told me not to worry.
    DA

  • General enquiry regarding starting the managed servers in weblogic

    Hi,
    Is there any sequence do we need to follow while bringing up the managed server? like in our set up we do have SOA,OSB & BAM managed servers.
    So during maintainance activities, we have to start in sequence like SOA(managed server1),OSB(managed server 2) then BAM(managed server3).
    In case if we change the above mentioned order the servers are not coming up.
    So, we would like to know what might be cause & is there a sequence do we need to go thru to start the servers? if Yes, please give us the justification.
    Thanks,
    Sudhir.

    In order to diagnostic the problem, you should post the error you're getting when trying to start the managed servers on a different order. Also, which mservers exactly are causing you problems?
    Regards,
    Franco.

  • General question regarding "parallelism" of iPhone execution

    I've got a general question and hope somebody can shed some light on this.
    While I'm relatively new to iPhone development I've been in software programing for more than 15 years now and have a solid background in Java, C, C++, C# and other languages. I've created a couple of applications for the iPhone, easy and complex ones, some using UIKit, others using Open GL and Open AL. With that said I think it would be fair to say that I know pretty much what I'm talking about.
    For those who tend to refer everybody back to the Apple Samples or PDF guides, please believe me, I've read them all.
    Here's my "question":
    I occasionally ran into a situation where I got the impression that code on the iPhone got executed in a "non sequential" or "parallel" manner even when I did not explicitly created threads. I'm not referring to code buried in a framework or so, I'm talking about code I've written. (English is not my mother tongue, so please excuse me if my explanation might be somewhat difficult to understand.)
    I try to give an example. Assume a code snippet like this:
    _gameEngine = [GameEngine alloc];
    [_gameEngine initSomeStuff];
    In my understanding the second statement (the initSomeStuff) gets executed once alloc returns and _gameEngine for sure is a valid pointer. Is that fair to say? I sometimes got the impression that the iPhone starts executing code without waiting that a method returned.
    I had similar issues when I tried to show an ActivityIndicator while another method was doing a lengthy operation. Pseudocode like this:
    [_activityIndicator show];
    [self longLastingOperation];
    [_activityIndicator hide];
    In code like the one above: Can I be 100% sure, that the hide message is not sent until longLastingOperation returns? I ran into a situation where I had the impression that show and hide got called immediately without waiting until longLastingOperation returned.
    Final example:
    [self performSelectorOnMainThread:@selector(doSomething) withObject:nil waitUntilDone:YES];
    [self nextStatement];
    -(void)doSomething {
    [self longLastingOperation];
    1.) In the above code, I understand the idea is that doSomething will be executed on the MainThread and that nextStatement will in no way be executed before doSomething has returned. Is that true?
    2.) doSomething is supposed to run on the MainThread but does this hold true for longLastingOperation, too? Or could it be that longLastingOperation WITHIN doSomething gets dispatched to another thread and doSomething returns PRIOR to longLastingOperation been finished?
    This might all sound pretty wired but as I said from time to time I ran into a situation where I got totally confused as to how stuff executes in – or out of – sequence. I helped myself with using NSNotificationCenters etc. but I'd like to understand what's going on in detail and crystal clear here.
    Your help is more than appreciated.
    Thanks,
    R.
    Message was edited by: BeSharp

    It is never safe to assume that any allocation was successful, and while it's incredibly unlikely that you're running into any such situation, it's entirely possible for a formal protocol to declare that a given message send should return immediately without waiting around:
    http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ch apter13_section_8.html#//appleref/doc/uid/TP30001163-CH9-BAJIGHAF
    An "impression" doesn't prove much unfortunately, so I'd recommend getting friendly with the debugger to see what's really going on.

  • General questions regarding capturing electronic signatures

    Hi Guys,
    Have some questions....
    Are electronic signatures supported in BPM and if yes any idea what types of signature? what standards are used, whether they are legally accepted and whether this is part of the package or a separate application. 
    can the processes support multiple signatures at multiple stages, signifying different levels of approval?
    Could you provide some idea on how electronic signatures are recorded and retained and how the process or document remains fixed once signed?
    Thanks in advace.

    this is more application related. nothing to do with BPM.

  • General query regarding availability of Older Versions of Connector bundles

    Hi Guys,
    How can I download the older versions of Connector bundles. I wish to download PeopleSoft User Management Connector 9.1.0. But the official Oracle website shows only some 11.x.x version. If I want to download some older versions, is there a separate archive or atleast can I get in metalink. I have searched metalink already and didn't find any. Please help.

    If you are not able to find older version of connector on Metalink then raise an SR with Oracle and give proper Business Justification for the same.

  • General Question regarding File Conversion

    Does flash pro provide the ability to convert video
    files,such as avi, mpeg, etc to flash video? Thanks for the
    help.

    yes
    Dan Mode
    *THE online Radio*
    http://www.tornadostream.com
    *Must Read*
    http://www.smithmediafusion.com/blog
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    "Joe Pau" <[email protected]> wrote in
    message
    news:e94jeq$o0$[email protected]..
    > Does flash pro provide the ability to convert video
    files,such as avi,
    > mpeg, etc to flash video? Thanks for the help.

  • General question  regarding NWDI!

    Hi experts,
    I'm using NWDI since two months as a developer and as a post-installer.
    According to your experiences, I would like to know when should we have to use NWDI ? With how many developers ? In which condition do we need NWDI ?
    Thanks for your answers.
    Regards

    Hello Berthe,
      You would use NWDI if you have the following conditions.
      1. You need to customize some sap delivered functions like ESS/MSS. NWDI becomes your build and transport environment in this case.
      2. The number of developers can range from 2 to n.
      3. You need to be able to have versioning and release cycles of the product you are developing
    Hope that helps
    Abdul

  • General question regarding problems

    Is it possible that most of the problems that people are having with the 5th is going to be eventually corrected with updated software?

    Many of the problems people are having can be divided into these areas:
    1. Poor Manual that ships with the IPOD. Most don't read the IPOD 101 before getting frustrated.
    2. Computer and Operating system is a mess before they load ITunes and connect IPOD.
    3. Bad manufactuered IPODs that have problems.
    4. Folks load corrupted files from P2P networks that further hang problems during transfer and play.
    5. Video files that are converted wrong that cause stuttering and audio/video snyc issues.
    6. Improperly disconnecting IPODs from Windows based PCs that cause the IPOD to lock up frequently.
    I could go on and on.
    Firmware could improve some things and maybe smooth a few areas out, but the majority of problems can be directly traced to the above.

Maybe you are looking for

  • How to unlock Sales Document (Sales Order)?

    Dear All, I was in the process to change a Sales Order. I did all the entries in required fields and before I could save the Sales Order, somehow, my SAP-Connection got disconnected. I logged again and run the T. Code: VA02 and gave the Sales Order N

  • Date Validation - a Nightmare for ME!

    Hi, I searched the forum and came up with some code that works for me partially. I am still having problems with getting the end result that is needed. I need to do a date validation where the begin date is less than end date. Below is the syntax..It

  • GG Implementation

    Hi Experts, There is a GG requiremnet. I have to install oracle goldengate on unix server on both source and target. source currently as a OLTP . the db version is oracle 11gr1. i would like to know the suitable initial load mechanism for implementin

  • Can't get macbook past spinning ball at start up.PLEASE HELP

    "Can't get Macbook past spinning ball at startup. PLEASE HELP" Older mac book with (??  10.5....  ??) Froze up. Force Quit "Kindle", "Sketch up" and "Safari". Have tried to use safe boot but after 5 min. of holding shift key the SBOD (Spinning Beachb

  • Padlock icon on the window "read informations".

    I can't find the padlock icon on the window "read informations" of my disk, because I wanna be able to change and add things on it but I can't. Please help me I'm french and I really need help. Actually I need to do that: Apply permissions to all ite