Unsing findByKey on non-primary, complex keys

Hello!
Can anyone show an example of how to use
the ViewObject.findByKey to find a row
using a (perhaps complex) non-primary key ?
Thanks.

Victoria:
Please run your test case with diagnostic turned on. It will show the SQL statement used for your findByKey() request. See if the SQL makes sense. If still doesn't work and if you cannot figure out what's going on, please post the diagnostic output.
To turn on diagnostic, you need to specify
-Djbo.debugoutput=console
as one of the JVM switches.
If you're invoking your app (middle-tier app) from command line,
include -Djbo.debugoutput=console as in
java.exe -Djbo.debugoutput=console ...
If you're running your app from within JDev:
1. Select the project.
2. Do right mouse click and select "Project Settings..."
3. On the Settings dialog, select Configurations/Runner.
4. In the righthand side pane, you should see a textbox for "Java
Options". Please add the following JVM switch:
-Djbo.debugoutput=console
Then, rerun. The run command should include
-Djbo.debugoutput=console as in
"D:\JDev9i\jdk\bin\javaw.exe" -Djbo.debugoutput=console -classpath ...
You should now see a lot more output on the IDE's message window.
Thanks.
Sung

Similar Messages

  • Partition key on non primary key column

    I have scenario where the table has defined non primary key column as "partition key".
    I was wondering how it will affect the purge/archive process if the index and table are using different column (they are not aligned)?
    What should be the solution to this scenario?
    Can I use the non primary key column as partition key? Is this affect purging/archiving or switching -IN or OUT partitions?
    Here is the article which Im following but didn't get the precise answer:
    "When the indexes and the table use the same partitioning function and columns in the same order, the table and index
    are aligned." 
    https://msdn.microsoft.com/en-US/library/ms345146%28v=SQL.90%29.aspx?f=255&MSPPError=-2147217396#sql2k5parti_topic9
    Look at "Index
    Partitioning" and "Defining
    the Partitioning Key" section.
    ZK

    If it non aligned, you cannot do switching in or out.  to switch, you should have aligned partitons.
    Hope it Helps!!

  • Selection criteria based on non-primary key columns in Custom-SQL

    Hi all,
    Could anybody please tell me how to perform a search using non-primary key columns, The query is written in Workbench under Custom Sql --> Read Object. The Query goes something like this
    select * from Employee where firstName like #name
    where firstName is a Non-primary key column.
    The Java Code goes like this
    Employee empm = new Employee();
    empm.setFirstName("John");
    Employee employees = (Employee) session.readObject(empm);
    This does not fetch me any values . I dont want the queries to be written in any java class. Is there Any other way to do it ??

    Hi all,
    Could anybody please tell me how to perform a
    search using non-primary key columns, The query is
    written in Workbench under Custom Sql --> Read
    Object. The Query goes something like this
    select * from Employee where firstName like #name
    where firstName is a Non-primary key column.
    The Java Code goes like this
    Employee empm = new Employee();
    empm.setFirstName("John");
    Employee employees = (Employee)
    session.readObject(empm);
    This does not fetch me any values . I dont want the
    queries to be written in any java class. Is there Any
    other way to do it ??I dont think you have set it up the right way to do what you want to do. You need to click on "Queries" on the Employee Descriptor and then Named Queries and then give a name for a named query and then choose ReadObjectQuery under type and then choose SQL under Format. Enter the custom SQL and then export the project xml file.
    Then in your application logic you have to call this named query the usual way.
    Employee employee = (Employee)session.executeQuery("findEmployeeByName,Employee.class,args);
    where args is a vector containing the name of the Employee.

  • Can we delete Non-Primary Supplier ?

    Hi Dear Friends,
    Can we delete Non-Primary or Inactive supplier from the Application, Is there any possibility(In Front end or Backend).
    And we are using Oracle Financials over ORMS.
    Thanks in Advance,
    Warm Regards,
    rahul

    Hi Rahul,
    the UI has no delete option.
    The message subscribers RMSAIASUB_SUPPLIER and RMSSUB_SUPPLIER do not implement a delete.
    So the answer seems to be No.
    A direct delete on the supplier table might be possible, of course after resolving any foreign key issues.
    Best regards, Erik

  • Building expression for complex key

    Hi
    I have an object with a complex key. I'm trying to create an expression that will generate a select to retrieve a list of objects by the complex primary key.
    The select should look like :
    select *
    from <table_name>
    where (<col1>,<col2>) in ( (val1,val2) , (val1, val3) )
    The problem is i cannot find a way to create the expression (<col1>,<col2>).
    Can anyone give me an example on how this can be done ?
    Thanks
    Inbal

    TopLink expressions do not currently support the IN((..), (..)), or nested array IN SQL. You will either need to generate your own custom SQL for this. Or build the expression dynamically using AND and OR instead of an IN.
    i.e.
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression inPrimaryKeys = null;
    Iterator iterator = primaryKeys.iterator();
    while (iterator.hasNext()) {
    List primaryKey = (List) iterator.next();
    inPrimaryKeys = builder.get("id1").equal(primaryKey.get(0)).
    and(builder.get("id2").equal(primaryKey.get(1))).
    or(inPrimaryKeys);

  • Normal Indexes created for Primary/Unique Keys in Oracle8/8i

    I remeber prior to Oracle8, when we create a Primary/Unique Key constraints, an unique index will be created by default. But I am noticing now in 8/8i when we create either Primary or Unique key, only normal/simple index is created. We are not able to override this normal index either by dropping and recreating the index alone. I believe it would be pretty much better in case of performance if we have a unique index for this columns. Can anybody help why is it changed so in 8/8i??
    Thanks,
    R. M.

    Dear Rob,
    since your answer was helpful and since it was the only one I will grant you full points on that.
    Thanks again for your input. In case other developers should look this thread up being confronted
    with the same kind of problem, here is how we solved it:
    We added an artificial primary key (a number of type NUMC 8) to the table which is supposed to
    include the structure. This key alone takes care of the uniqueness of eacht entry.
    All the others fields that we want to have available for a fast direct access, including the ones
    from the included structure, are put together in a secondary index.
    best regards
    Andreas

  • Query Builder recognizing primary/foreign key

    Is there a way to have Query Builder recogninze the primary/foreign keys of the tables when they are selected? Right now it looks like you have to manually join the tables together by selected the column(s) to join.
    Thanks

    You can define a query key[1] 'planId' on InvestmentOption for the PLAN_OID column. That'll let you write an expression like the one below which does not produce a join. The nice part about the query key is that it does not require you to add attributes to your object in order to query o them.
    Expression plan = new ExpressionBuilder();
    Expression where = plan.get("planId").equal(somePlanId);--Shaun
    [1] http://www.oracle.com/technology/products/ias/toplink/doc/10131/main/_html/descfg010.htm#sthref3039

  • Missing primary foreign key in grandchild table

    I have a model with a two inheritance generations.
    https://www.dropbox.com/s/4rghqcmxx24bgvt/pf_logical.png
    When I engineer all entities everything is fine. The child tables get their primary foreign keys:
    https://www.dropbox.com/s/t4v5bexxwdrn5y1/pf_engineered.png
    But when I do not engineer the child generation the grandchildren have no primary foreign keys anymore.
    https://www.dropbox.com/s/ofl436sm8dua3w8/pf_missing.png
    I have expected, that the grandchildren get a primary foreign key to the grandfather. But that is not the case. How can I tell the modeler to engineer such a foreign key?

    Hi,
    thanks for reporting the problem. I logged a bug for that.
    Philip

  • Configuring IPIB with non-default partition key

    Hello
    I want to put IB HCA port into non-default partition to create separate network on my IB fabric. On IB switch (Voltaire ISR9096) I created network with non-default partition key 0x7ffe and add HCA port to this partition.
    But this IB-VPPA was displayed as unconfigured on Solaris host
    ib::3BA0001004181,ffff,ipib    IB-VPPA      connected    configured   ok
    ib::3BA0001004182,fffe,ipib    IB-VPPA      connected    unconfigured unknown
    ib::3BA0001004182,ffff,ipib    IB-VPPA      connected    configured   okConfiguration of new VPPA with cfgadm was unsuccessful:
    # cfgadm -c configure ib::3BA0001004182,fffe,ipib
    Configure the device: /devices/ib:fabric::3BA0001004182,fffe,ipib
    This operation will suspend activity on the IB device
    Continue (yes/no)? yes
    cfgadm: Hardware specific failure: configure operation failed ap_id: /devices/ib:fabric::3BA0001004182,fffe,ipibI unconfigured VPPA with default partition key (0xffff) on HCA port 0x3BA0001004182 and issued cfgadm for VPPA with pkey 0xfffe again - the same effect.
    I tried this on Solaris 10 8/07 and OpenSolaris b72 with the same result - no success ;)
    Is it possible to configure VPPA with non-default pkey on Solaris ?
    Is it possible to configure more than 1 IPIB VPPA on single HCA port ?
    How to perform these configurations ?
    Thanks in advance.
    Regards,
    Denis

    hi
    I was able to setup the listener to serve both databases using netmgr, thanks. Apparently I was trying to use the wrong tool for this previously.
    Now i'm able to access the EM Database Control and it seems to be working fine though i get the following error message
    Logged in As SYS
    Error
    java.lang.Exception: Number of responses does not match queries
    Database Instance: devel.foo.bar
    Now, i'd like to be able to use EM for administering two separate databases (running on the same host). Do i need to migrate the database control somehow to grid control? How do i do that?
    What about security? I'd like to use SSL and limit connections to selected clients only.
    regards,
    aspa

  • Non-"primary line" backup assistant management

    how do you manage a non-primary line's backup assistant from the web?  seems like the only capability is to manage the primary line's contacts.  i have 5 lines and want to manage contacts on the other 4 phones.

    You need to create a MyVerizon account for EACH of the lines; they will each have their own log in and password. Secondary lines will not see any billing information, but they will be able to manage backup assistant for the phone associated with that number.
    Creating the accounts will take a bit of time initially, but backups can be automatic and once they are set up, it makes upgrading or swapping phones much easier.
    If you get the message that the number is already registered, you'll need to log totally out of Verizon and possibly clear cookies before trying to register with each secondary number.
    HTH,

  • BI primary currency key

    All,
    We have upgraded the development system to NW2004s BI, and ran into the primary currency key issue due to the new ISO requirement. This causes one of the APDs to fail. The fix is to the set the primary currency key via SPRO within BI.
    As part of the test, I ran the Transfer Global Setting (RSIMPCUST) with the currencies option, and have validated the source system contains the proper primary currency key setting. After the transfer, the BI primary currency key becomes uncheck – disappear so to speak. The source system in this case is R/3 Enterprise, with
    SAP_BASIS      620       0055 SAPKB62055     SAP Basis Component           
    SAP_ABA         620       0055 SAPKA62055     Cross-Application Component   
    SAP_APPL        470       0024 SAPKH47024     Logistics and Accounting      
    SAP_HR            470       0045 SAPKE47045     Human Resources               
    EA-IPPE            200       0020 SAPKGPIB20     SAP_iPPE                      
    PI                       2004_1_4700013 SAPKIPZI5D     R/3 Plug-In (PI) 2004.1 for R/3
    We have a customized program that can run after the periodic RSIMPCUST to set the proper currency key. However, I would prefer the “SAP” way of resolving this issue.
    Thanks in advance for any assistance,
    Alex

    Yes, you need to maintain it for CNH also.
    Regards,
    Gaurav

  • Prcedure to joining of two tables and pls explore the primary & foriegn key

    Dear All,
    Am new to this forum looking forward to have some discussions and guidance reg ABAP.
    <b>My query is</b>
    what is the prcedure to joining of two tables and pls explore the primary & foriegn key relationships.
    Your kind help is required in this query .
    Thanks n regards
    Carol P

    Hi Carol,
    Joining two tables fetch data from tables that has relevent entry based on the keys. like LIKP and LIPS these are delivery tables. if the business requirement is fetching delivery data that are exists in both two tables. here LIKP will conatins a single entry against a condition and LIPS may contains several entry because one delivery may has multiple line items. so, fetch the data joining the two tables on vbeln that is delivrey number. this is used to increase the performance of the program except for all entries.
    Foreign key is poiting twowards primary key; it may be 1:1 , 1:many and many:many. if field1 of table a is pointing towards field1 of table b. then based on these condition at the time of entry SAP will check how many entry can be entred in field1 of table a.
    regards
    Krishnendu

  • None of the key working- Curve

    Need assistance ? None of the key working in my Curve 8900. Receiving messages, mail, calls -unfortunate can't attend or reply. Please suggest 

    Please supply more relevant information about your problem. 
    There is no way to troubleshoot a problem and suggest steps to resolve with as little data as you have given.
    Basically would need the complete who, when, what, where...
    DId it work up until some action on your part...
    Was it subject to moisture (a common cause of keyboard issues)
    Was it dropped....
    Have you taken it by the way to your service provider (hopefully also your source) and had them look at it...
    Details, we need details...
    Наглый пес! Вы должны быть благодарны мы даем Вам возможность проживать в нашем мире!
    BB 9550 Verizon OS 5.0.0.1015 My Storm My Blackberry My Lifeline
    If there is a Theme on my Blackberry, Hedone it!
    If someone successfully helped you with an issue, say thank you by clicking "kudos" in their post and clicking the star.
    Antiquis temporibus, nati tibi similes in rupibus ventosissimis exponebantur ad necem
    If your issue has been solved, please mark the post that solved it for you!

  • Mark in and out point on non-primary storyline

    Ok - I must be missing something... How do I mark and in and out point in a non-primary storyline?
    Say, I want to replace part of a non-primary storyline with gap... The only way I've seen to do that would be to blade the clip in the non-primary storyline into three parts and 'delete' the middle bit out, which is what marking an 'in' and 'out' and pressing 'delete' is the accelerated way of doing it in the primary storyline.

    Yes I know.
    The thing with markers (M) is that these are always placed on the primary storyline, except if you selected a clip in the non-primary storyline. So I don't know why you must first select the Range Selection tool to make in's and out's. Why don't it works just as the markers do.

  • HT1941 Bluetooth keyboard setup has locked up keyboard, it's looking for a wireless keyboard, none of the keys on the keyboard are functioning, I can get out of the screen, or shut down my Mac, ... anyone??

    The bluetooth keyboard setup has locked my keyboard, none of the keys are functioning, holding down the power button does nothing, I don't know how I got into wireless keyboard setup, and I don't know how to get out. Anyone?

    Hi:
    I wish my suggestion had gotten you further.
    I do suggest you try to connect the keyboard again.  The request for a number is a step in it trying to pair.  If it gets by the number, it sometimes takes a little while to get connected.  If you are unable to get it connected and want a new one, I have been using Apple Bluetooth keyboards for years - and I like them. The one I have (the newest model) only uses two batteries and is very thin. 
    Speaking of batteries, if you are not already doing so, you might consider rechargeables.  I have a drawer full of them and use a 15 minute charger.  I go tired of buying batteries and rechargeables are environmentally friendly to boot. At the moment, I use 2450 mAh Energizers and a 15 minute Energizer charger (all purchased new on eBay at a very reasonable price).
    I am far from an iPad "expert," although I have one.  If my suggestion below does not help, post your question in a separate thread in the iPad forum.
    I had a terrible time syncing my iCal on my Mac with my iPad iCal (confusing - hopefully it makes sense).  I quit using iCloud as that added to the confusion. There is a facility to one-time sync items.  When you connect your computer to your iPad, iTunes opens.  The system begins a process (automatic backup and so on). After it finishes, you can click on "info."  At the bottom of the screen, there is an advanced section.  You can select any of the items and then force it to sync. The iCal information from your computer would be deposited on the iPad. 
    After all that, I do not use a Google calendar so the information may be worthless to you.
    If you want to reset the iPad to factory settings, you can do that when it is connected to iTunes (one of the options).  Me being me, I try never to erase anything. 
    Barry
    Message was edited by: Barry Hemphill

Maybe you are looking for

  • Unable to watch rendered video

    I can watch video in real time preview on out monitor but unable to watch rendered video. It is just like a unsynchronized video. What may be the cause?

  • Inbox has taken over my Mozilla Firefox page, as well as the Internet Explorer. How do I get rid of it? It's no longer on my Control Panel to delete/

    Looking for map/info about MARC from Martinsburg, WV to DCA, it appeared I needed to "sign in" to get info. InBox took over the homepage screen. I have gone to Control Panel and deleted Inbox from there. But, it AIN'T gone. I don't want to go into an

  • Photoshop cs5 crashes upon opening.

    My cs5 photoshop crashes upon opening. I have attached the problem signature below. Has anyone else had this same issue. If so any solutions? Problem signature:   Problem Event Name: APPCRASH   Application Name: Photoshop.exe   Application Version: 1

  • Raw Recovery?

    So my hard drive is asking to re initialize when it has already been formatted and data has been stored. I would like to recover my files it shows its a raw format now so it cant be mounted but shows up in disk utility. does anyone know of a free or

  • Trying to convert raw in lightroom 3.2

    Hi  New  here and not seeing  the way to import  the  raw file when I shoot  jpeg and raw at the same time.. and then develop those files ?  any help  please  also did there used to be a setting during development for  "lights" ?   Thanks  in advance