Problem in using LIKE expression and mapping relationship: @OTM / @MTO???

Hi there,
I have 2 entity classes:
@Entity
@Table(name = "DT_KHV_DTL", schema = "DTKB", uniqueConstraints = {})
public class VoucherDtlEnt {
bq.      private String id; \\     private DuAnEnt duAnEnt; \\     //... others
bq.      @Id \\     @Column(name = "ID", unique = true, nullable = false, insertable = true, updatable = false)
bq. public String getId() {
bq. bq. return id;
bq.      } \\     public void setId(String _id) {
bq. bq. this.id = _id;
bq. }
bq.      @ManyToOne(targetEntity = DuAnEnt.class) \\     @JoinColumn(name = "DA_ID")
bq. public DuAnEnt getDuAnEnt() {
bq. bq. return this.duAnEnt;
bq.      } \\     public void setDuAnEnt(DuAnEnt _duAnEnt) {
bq. bq. this.duAnEnt = _duAnEnt;
bq. }
bq. //... others
@Entity
@Table(name = "DT_TTDA_C", schema = "DTKB", uniqueConstraints = {})
public class ProjectEnt {
bq. private String id; \\ //... others
bq.      @Id \\     @Column(name = "ID", unique = true, nullable = false, insertable = true, updatable = false)
bq. public String getId() {
bq. bq. return id;
bq.      } \\     public void setId(String _id) {
bq. bq. this.id = _id;
bq. } \\ //... others
bq.
I want to list details-vouchers which have project id like the search parameter. In SQL this will be: SELECT * FROM DT_KHV_DTL a WHERE a.DA_ID LIKE ?
I've tried in JPQL with this query:
bq. SELECT voucherDtlEnt FROM VoucherDtlEnt voucherDtlEnt WHERE voucherDtlEnt.projectEnt.id LIKE :projectId
Of course it's work but it make a big problem: it will generate a JOIN SQL query like that:
bq. SELECT t0.id ... FROM DT_KHV_DTL t0, DT_TTDA_C t1 WHERE t0.DA_ID = t1.ID AND t1.ID LIKE ?
In my real case, the project number is around 10.000, this generation take me from 0.1s in SQL to minutes in JPQL, even in complex situation, it freeze the application server.
In other case without LIKE, this will be done with:
bq. SELECT voucherDtlEnt FROM VoucherDtlEnt voucherDtlEnt WHERE voucherDtlEnt.projectEnt = :projectEnt
which perform a true SQL:
bq. SELECT t0.id ... FROM DT_KHV_DTL t0 WHERE t0.DA_ID = ?
So, I've tested:
bq. SELECT voucherDtlEnt FROM VoucherDtlEnt voucherDtlEnt WHERE voucherDtlEnt.projectEnt LIKE :projectEnt --> Error cause LIKE expression only apply for String type
bq. SELECT voucherDtlEnt FROM VoucherDtlEnt voucherDtlEnt WHERE voucherDtlEnt.projectEnt LIKE :projectId --> Error cause can't compare 2 dif class: ProjectEnt and String
Have any solution ???
+I'd happy if the generator don't check type String in
the query:+
bq. SELECT voucherDtlEnt FROM VoucherDtlEnt voucherDtlEnt WHERE voucherDtlEnt.projectEnt LIKE :projectEnt
instead just check inserted entity have an Id in String type, so can threat this like the '=' expression case.
bq.

After review, I've found the problem is not in JOIN but stupid generator do one like this:
SELECT t0.id ... FROM DT_KHV_DTL t0,{color:#ff0000} DT_KHV_DTL t2{color}, DT_TTDA_C t1 WHERE t0.DA_ID = t1.ID AND t1.ID LIKE ?
In SQL native query, cause t2 don't identify join column with t0, it will make a big problem that must remove this or just add AND t0.ID = t2.ID
I'm using Oracle Application Server 10.0.1.3 and have any fixed this in newer versions???
Still trying to REMOVE

Similar Messages

  • I am trying to use macro express and adobe acrobat 9 profession keeps shutting down, why is this happening?  I tried to run as administrator already as well on both Macro Express and in Adobe and it still keeps shutting down.

    I am trying to use macro express and adobe acrobat 9 profession keeps shutting down, why is this happening?  I tried to run as administrator already as well on both Macro Express and in Adobe and it still keeps shutting down.

    same problem, it's been happening to me for a week or two now i'm thinking about backing up my documents and just wiping it completely, see if that works. Has anyone else tried this? I'm loosing time and have already lost a good few hours of work as it just crashes randomly. need help!!!
    - saving these threads on my favourites cause i'm about to crash . . .

  • I have a linksys WRT54G router that we use as a base. I want to use Airplay using Airport Express and hook up my stereo to it. How can i set up my Airport express without a PC/laptop? I just downloaded Airport utility on my iphone and ipad,will that work?

    I have a linksys WRT54G router that we use as a base. I want to use Airplay using Airport Express and hook up my stereo to it. How can i set up my Airport express without a PC/laptop? I just downloaded Airport utility on my iphone and ipad,will that work? And one more thing about the setup, the linksys router shich acts as a base is in a different room as the airport express which i wanted to use for airplay. So I'm hoping to hook up the Airport express via wireless signal. If i can set it up, can someone pls help me out by posting detailed instructions. Thanks so much!

    The first message that AirPort Utility will display during the auto setup will be that the Express will be confgured to "extend" the network. When AirPort Utility analyzes the network further, and sees that the Express cannot "extend" the 3rd party network, the next message will indicate that the Express is being configured to "join" the wireless network.
    Once the Express is configured, if you later go into AirPort Utility to check the settings under the Wireless tab, you will see that the Wireless Mode is indeed "Join a wireless network".

  • Find text using regular expression and add highlight annotation

    Hi Friends
                       Is it possible to find text using regular expression and add highlight annotation using plugin

    A plugin can use the PDWordFinder to get a list of the words on a page, and their location. That's all that the API offers for searching. Of course, you can use a regular expression library to work with that word list.

  • I just recently synchronized my contacts using outlook express, and I want to be able to view the phone contacts on the computer, how could I do that?

    I just recently synchronized my contacts using outlook express, and I want to be able to view the phone contacts on the computer, how could I do that? I can't restore the phone then back it up on my computer because I'm on using windows XP and I cannot update my iTunes and thus I can't synchronize my phone back so I lost all my important work contacts and I'm just wondering if I can somehow access it on the computer

    You would open Outlook Express on your PC...

  • Problem in Creating .wsdl file and mapping.xml with ant

    hi
    i am created my .wsdl file and mapping.xml file with wscompile tool but when i run this by ant tool it show a problem.
    the command runs on command prompt but when run throught ant file it shows a following error :-
    Execute failed: java.io.IOException: CreateProces: wscompile -define -mapping build\classes\META-INF\mapping.xml -d . -nd build\.................and so on
    so if anybody have any idea then plz help me asap
    thanx

    The following Ant snippet is the way I've defined my wscompile task. I'm creating a web application and it looks like yours might be an EJB endpoint, but you can adjust where necessary:
    <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
         <classpath refid="compile.classpath" />
    </taskdef>
    <target name="init">
         <echo message="-------- ${appname} --------" />
    </target>
    <!-- This target compiles the server components using an existing WSDL as the driving document.
           The configuration file must use the <wsdl> element giving the location (local file system
           or URL) of the WSDL document.
           Note: the fork argument is needed to over come a bug when using the mapping argument. See
           http://forum.java.sun.com/thread.jspa?threadID=592994&tstart=0
      -->
         <target name="generate-server-from-WSDL" depends="init">
              <wscompile fork="yes"
                           keep="true"
                           base="${basedir}/WebContent/WEB-INF/classes"
                           import="true"
                           features="wsi"
                           xPrintStackTrace="true"
                           verbose="true"
                           mapping="${basedir}/WebContent/WEB-INF/jaxrpc-mapping.xml"
                           sourcebase="${basedir}/src"
                           config="${config.server.doclit.file}">
                   <classpath>
                        <path refid="compile.classpath" />
                   </classpath>
              </wscompile>
         </target>
         <target name="compile-server-from-WSDL" depends="generate-server-from-WSDL">
              <javac srcdir="${basedir}/src" destdir="${basedir}/WebContent/WEB-INF/classes" debug="${compile.debug}">
                   <classpath refid="compile.classpath" />
              </javac>
         </target>Just make sure that the named destination directories exist before you run the script.
    If you'd like more details on the wscompile Ant task, I found the following pages invaluable:
    https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html

  • Problem while using Copy Express

    hi All...
    I'm using copy express to copy user defined tables and UDO's from one system to other whose database is not shared....it works fine.only problem is it doesnot copy whole data from table UDO2 to other UDO2..
    Thanks.......

    Please check this thread to see if it related to you:
    Copy Express distorting data
    Thanks,
    Gordon

  • Help - Receive message "an error occurred printing this document" when using airport express and Ipad

    Hi, I am trying to set up an airport express hub to work with a Star tsp100 receipt printer and IPad 2. The IPad is being used to accept credit card payments and I was hoping to print receipts out wirelessly using the airport express and receipt printer. I checked to make sure the airport express has the latest firmware and it does. The IPad software is also updated to the latest 7.1.  I then connected the Airport express and IPad and the network setup with no problems. I connected the receipt printer to the airport express using the USB slot available. While the printer comes up as available, when I attempt to print something, I get the error message "An error occurred printing this document" and I can cancel or Try again. No matter how many times I try, I continue to get this message and I lost as to the cause. When I disconnect and reconnect, another instance of the printer appears, but receive the same cryptic error message when I try to print. Totally lost, please help

    Hi kelston3,
    In order to print from an iPad you will need to use a printer that is compatible with AirPrint, which is described in the following article -
    About AirPrint
    http://support.apple.com/kb/HT4356
    AirPrint printers must be wireless on your network - not connected via USB to the base station. There is a list of printers that are known to be compatible with AirPrint in the article.
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • Streaming 3d movies to my Samsung 3DTV using AirPort express and a wireless LAN adapter has not worked.   What is my cheapest option for making this happen?

    I need a transfer rate minimum of 9mbps.  My AirPort express and 3DTV are on different floors, so I cannot directly connect with an ethernet cable.  Can I buy an older AirPort express, use it as a bridge, and connect my TV to it via an ethernet cable?

    Hi rockchalker,
    Thanks for using Apple Support Communities.
    For 802.11n Wi-Fi base stations, creating a roaming network is by far the best choice. This will provide the best throughput between the base stations and your Wi-Fi devices.
    If you are unable to build the recommended Roaming network, then a Wirelessly Extended Network is the next best option.
    For more information on this, take a look at this article:
    Wi-Fi base stations: Extending the range of your wireless network by adding additional Wi-Fi base stations
    http://support.apple.com/kb/HT4145
    Hope this helps,
    Mario

  • My problem in using weblogic Datasource and proxy user

    Hello
    I create a DataSource in Weblogic that connect to the database by a proxy user and I have a client application that use this DataSource and create a proxy session , I've written my client application (it's a stand alone client application) code below :
    public static void main(String [] args) {
    OracleConnection conn=null;
    javax.sql.DataSource ds=null;
    Hashtable env = new Hashtable();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
    env.put(Context.PROVIDER_URL, "t3://127.0.0.1:7001");
    try{
    Context context=new InitialContext( env );
    ds=(javax.sql.DataSource) context.lookup ("OracleConnection2");
    conn=(OracleConnection) ds.getConnection();
    java.util.Properties prop = new java.util.Properties();
    prop.put(OracleConnection.PROXY_USER_NAME, "web_user1");
    prop.put(OracleConnection.PROXY_USER_PASSWORD,"web_user1");
    conn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME, prop);
    if (conn.isClosed()){
    System.out.println("Connection closed");
    return;
    testJDBC(conn,true);
    for(int k=0;k<10;k++){
    testJDBC(conn,false);
    conn.close(OracleConnection.PROXY_SESSION);
    conn.close();
    }catch(Exception ex){
    ex.printStackTrace();
    It works but my problem is that in line "prop.put(OracleConnection.PROXY_USER_PASSWORD,"web_user1")" or line "prop.put(OracleConnection.PROXY_USER_NAME, "web_user1");"
    Let me to mention a scenario :
    *1- I type a wrong username or password in my client application and I run the client application it shows me this error : invalid username/password*
    *this error is acceptable*
    *2- then I correct the wrong username or password immediately and run the application again , it shows me this error (at line conn.openProxySession(OracleConnection.PROXYTYPE_USER_NAME, prop)) :*
    java.sql.SQLException: Closed Connection
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
         at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at oracle.HRFacadeClient.main(HRFacadeClient.java:38)
    *3- I run the application again (by correct username and password) but this time it shows me this error :*
    java.sql.SQLException: Unsupported feature
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
         at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_1032_WLStub.openProxySession(Unknown Source)
         at oracle.HRFacadeClient.main(HRFacadeClient.java:38)
    *4 - if I repeat running the application for multi times every time it shows me the previous error*
    *5- I wait about one minute the problem solved and my application can create proxy session *
    the result is that if I wanna create proxy session by wrong username or password and I get "Invalid username/password" error message , then after correcting username or password I have to wait about one minute and then run the application again_
    Do you know how I can overcome this problem ?
    Thank you

    Hi Jamshid,
    There is same problem observed few days back with us, and we have used the below code, and it got solved. Actually there is a problem observed while using proxy connections on weblogic.
    if(conn instanceof weblogic.jdbc.extensions.WLConnection){
         weblogic.jdbc.extensions.WLConnection cn=(weblogic.jdbc.extensions.WLConnection)conn;
         cn.clearStatementCache();
    http://rocksolutions.wordpress.com/2010/06/04/connection-pool-issue-on-weblogic/
    Hope this helps.
    Thanks

  • I used Airport Base station and I was able to extend my network using airport express and connect my printers.  Now I am using Extreme and I can't extend the network (Express) or the printers nothing shows up.  I am using utility 6.3 and Mt Lion  What is

    I had an Aiport Base Station and extended using Airport Express, where I also connected my printers (network). Now using Airport Extreme off Mt Lion 10.8.4 and Utility 6.3.
    I can't extend the network (express) or connect my printers (USB) nor will it find my one wifi printer.
    What's up?

    For now, leave the AirPort Express powered off.
    Power off the entire network....all devices.....in any order that you want
    Wait a few minutes
    Power up the modem first, and let it run 2-3 minutes by itself
    Power up the AirPort Extreme next, and let it run a full minute
    Keep powering up devices one at a time about a minute apart until everything is powered up (leave the Express off for now)
    Open AirPort Utility and check to see if the AirPort Extreme is visible.
    If it's not, click the AirPort Utility menu at the upper left of the screen, then click About AirPort Utility. Post back with the version number of AirPort Utility that you see there....which should be AirPort Utility 5.6.1.
    Post back on your progress.

  • Backup of MacBook using Airport Express and File Sharing

    I have an iMac backed up (500GB internal drive) using Time Machine to a Western Digital external drive (1TB) via Firewire; I also have second external drive (500GB) for FCE and Photoshop use. I'm about to buy a MacBook (160GB drive) for my wife, and an Airport Express (connected via cable modem) to give her wireless access to the internet and wireless access to our printer. My first thought was to get the Airport Extreme and try wireless backups for both the iMac and MacBook using Time Machine and connecting the backup drive as an Airdisk. However, I've also been reading about the slow performance and iffy future Apple support for this arrangement.
    Well, that's the windup -- here's the question. Is it feasible for me to just use filesharing in my iMac to have the MacBook work files (and folders) saved directly in the iMac public folder? The rationale is that I would change nothing in my current IMac/backup drive configuration. The iMac acts as a wireless network fileserver for the MacBook. The MacBook work files would then automatically get backed up as part of the iMac backups. There would be minimal network use for file use and storage between the two computers because only work files from the MacBook will get saved on the iMac.
    Do I have this right, or am I missing something?

    Well, that's the windup -- here's the question. Is it feasible for me to just use filesharing in my iMac to have the MacBook work files (and folders) saved directly in the iMac public folder?
    Sure. This is not supported by Time Machine but you could open/save the files directly from the Finder or application in use.
    OR you could use Time Machine to make a backup of the MacBook to the 1 TB external drive connected to the iMac. That is the scenario I use with my iBook and iMac.

  • Using Airport Express and music sounds distorted.....

    I just hooked up my airport express to my whole house stereo and the music sounds distorted.  I've adjusted the volume on the amplifier, the room volume control and the computer volume control.....and it still sounds distorted.  Any ideas on what I can do?

    Temporarily, plug a pair of headphones into the AirPort Express and check the sound quality. It is OK, you know that everything is working through the AirPort Express.
    Often the audio plug will make poor contact with the audio jack on the Express which can cause a hum or intermiitent audio signal. Wiggle the plug around to see if this might be the case. You may need to try another audio cable.
    Make sure that you are not plugging into a PHONO input on the amplifier. You would want to use AUX or CD or even TAPE would work if you have an older amplifier/receiver.

  • Problem while using camera connetor and Sony DSC-M1

    Dear all
    My digital Camera Sony DSC-M1 is able to take pictures and take video into mpeg4 format .
    this is the revirew of this camera
    http://www.steves-digicams.com/2004_reviews/m1.html
    However, I got a problem while using this camera with iPod +Camera connector.
    When I plug this camera into camera connector , ipod will transfer all photo from the camera , but do nothing with the video.
    I guess that problem is the video file is not inside the "/DCIM" folder
    All video file ( *.mp4 ) are all in the folder named " /MP_ROOT/101MNV01/ "
    Can anyone help me how to make this sync from camera to ipod automatically both photo and video ?
    This problem also bother me while I am using iPhoto to transfer the file when I was home .
    pls , help me , thanks a lot

    Hi there, I'm having exactly the same problem. Have you found out how to do it?

  • How can I extend my wireless network using Airport Express and an Airport Extreme on BT Infinity?

    I have BT Infinity and I am using the Time Capsule with Airport Extreme as my router. Working well (even on wireless). I want to extend the wireless network with an Airport Express, but I cannot work out the settings necessary in Airport Utility. I am using Mountain Lion 10.8.2 on a Mac Pro. Please help!

    BT,
    I've read several of your posts, thanks for taking the time to share your wealth of knowledge.
    I'm in a situation similar to the one described by 'scoutusmaximus'.  Seeking the flexibility of a standalone router, I finally upgraded my 4-yr old ATT DSL gateway (modem+router) to a Comcast standalone modem + the ASUS RT-AC66U: http://www.asus.com/Networks/Wireless_Routers/RTAC66U/
    Typically, I stick with all things Apple but the ASUS router seemed fairly superior to the current-gen base station (on paper, anyway; time will tell when it comes to performance) so, for once, I jumped ship.  My plan was to extend the ASUS wired/wireless network using my TimeCapsule and 2 Airport Expresses in bridge mode, however, a google search turned up several unhappy customers that claim those devices don't play well with non-Apple routers, especially when it comes to 'extending' a network. 
    Questions:
    1. Can I successfully extend the wired/wireless network created by the ASUS router using the 3 airport devices listed above w/out negatively impacting performance?  I'd rather have 1 wireless network as opposed to creating a new wireless network with the TC and then extending it with the AP Expresses... though I'd consider that option down the line if it came to that.
    2. Will the LAN ports on the TimeCapsule remain functional?
    Btw, my house is wired so, I can reach all 3 devices via ethernet cable coming off of a central, managed switch.  Supposedly, you only lose the LAN ports on the TC if you extend wirelessly.
    Any advice would be appreciated.

Maybe you are looking for

  • Dump in transaction solman_workcenter

    We are using solution manager 7 EHp1 when I run transction solman_workcenter sap reply with dump The URL http://FQDN:8097/sap/bc/webdynpro/sap/ags_workcenter/ was not called due to an error. Note The following error text was processed in the system S

  • OnLocation - can I change the codec?

    Hello, I am using OnLocation CS4 with a Canon XH A1s camera which records in HDV format on a MiniDV tape. I was able to record fromt eh camera to the Laptop and it looked great! I was wondering if there is any way I could record to a different codec

  • When on the phone to someone the phone crackles and hangs up so the other person can't hear what is wrong with it? :(

    When on the phone to someone the phone crackles and hangs up so the other person can't hear what is wrong with it? :(

  • CommonDocuments folder in iCloud storage

    On my iPad, under Settings > iCloud > Storage > Manage Storage  I see a folder called CommonDocuments. It has a blank grey icon. It contains a couple of files (a pdf and a jpg) that I copied to the iCloud using an app (Documents) on my iPad. The docu

  • Need tips for iOS development

    i just bought an ipod touch 4g and i want to start developing apps, im reading that i should update my air version, i would like to work in pure as3, no flex, what would be my best choice and what version of air should i use, also is there any docume