OneToMany differences - Hibernate EntityManager 3.3.1 and TPL11.1.1.0.0

Two entities 'Employee' and 'Address'. Employees as a collection of 'Addresses' and I want to map this OneToMany unidirectionally. In doing so I've noticed some differences between Hibernate EM 3.3.1 and TPL 11.1.1.0.0. Apart from the fact that I didn't manage to get this OneToMany mapping working in Toplink - can somebody explain why there is a difference, since it is standard.
@OneToMany without any other annotations in Hibernate results in (With ddl creation on):
a created intersection/jointable containing two FKs for each relationship end.
@OneToMany without any other annotations in Toplink results in (With ddl creation on):
Exception Description: [class com.cumquatit.research.derby.domain.Employee] uses a non-entity [class com.cumquatit.research.derby.domain.Address] as target entity in the relationship attribute [private java.util.Collection com.cumquatit.research.derby.domain.Employee.addresses].
@OneToMany with @JoinColumn(name="EMPLOYEE_ID") in Hibernate results in:
a created column (EMPLOYEE_ID) at the Address table which is FK to Employee.
@OneToMany with @JoinColumn(name="EMPLOYEE_ID") in Toplink results in:
Exception Description: one-to-many for attribute name [addresses] in entity class [class com.cumquatit.research.derby.domain.Employee] should not have join-column(s) specified. In the case where the one-to-many is not mapped by another entity (that is, it is the owning side and is uni-directional), it should specify (optional through defaulting) a join-table.
Thanks (again),
-J.

Update -
Having established that the @OneToMany + @JoinColumn annotation as accepted by Hibernate is non-standard, and the fact that that unidirectional OneToMany relationships should be implemented using a JoinTable, I have found yet another error (of mine) that Hibernate is ironing out.
Regardind @OneToMany and Toplink I now can confirm that this indeed works according to specs. Toplink will create the tables like so:
CREATE TABLE EMPLOYEE (ID INTEGER NOT NULL, EMPLOYEENUMBER VARCHAR(10)
UNIQUE NOT NULL, GENDER VARCHAR(255), FULLNAME VARCHAR(255), HIREDATE DATE,
EMAIL_ADDRESS VARCHAR(255), PRIMARY KEY (ID))
CREATE TABLE ADDRESS (ID INTEGER NOT NULL, ADDRESSLINEONE VARCHAR(255), CITY
VARCHAR(255), ZIPCODE VARCHAR(255), PRIMARY KEY (ID))
CREATE TABLE EMPLOYEE_ADDRESS (Employee_ID INTEGER NOT NULL, addresses_ID
INTEGER NOT NULL, PRIMARY KEY (Employee_ID, addresses_ID))
ALTER TABLE EMPLOYEE_ADDRESS ADD CONSTRAINT MPLYADDRESSmplyeID FOREIGN KEY
(Employee_ID) REFERENCES EMPLOYEE (ID)
ALTER TABLE EMPLOYEE_ADDRESS ADD CONSTRAINT MPLYDDRESSddrsssID FOREIGN KEY (addresses_ID) REFERENCES ADDRESS (ID)The thing I was missing - silly mistake coming - was to incorporate the entity class in the orm.xml file as it is references from the persistence.xml file. Not doing so in Toplink will yield:
Exception Description: [class com.cumquatit.research.derby.domain.Employee] uses a non-entity [class com.cumquatit.research.derby.domain.Address] as target entity in the relationship attribute [private java.util.Collection com.cumquatit.research.derby.domain.Employee.addresses].It looks like Hibernate simply corrects my mistake by implicitly using the referenced class.

Similar Messages

  • Difference between cleared items,open items and all postings (FI).

    Hi experts,
    Can anybody tell me the difference between cleared items,open items and all postings for an account.
    While running corresponding bapis and transaction FAGLL03 (for GL) or FBL1N (for accounts payable) i found that in some cases all postings is less than cleared items or open items for a time period. How could it happen.According to my knowledge all postings should contain cleared items and open items.
    Please correct me..
    Thanks and Regards
    Arjun

    Hi Arjun,
    For every Billing Documnet created(VBRK/VBRP-VBELN) there will be an accounting document created in BSID/BSAD tables.
    OPEN ITEMS means the Billed/Invoice Amounts that are pending from Customers, i.e which we have to receive from Customers.
    CLOSED ITEMS means the AMOUNTS received from that customer.
    OPEN ITEMS : fetch data from BSID table Only
    CLOSED ITEMS : fetch data from BSAD only.
    ALL POSTINGS : fetch data from both BSID and BSAD.
    Hope this will help.
    Regards,
    Nitin.

  • The Difference between iphone Unlock T-Mobile and iphone Unlock Free-Sim

    As mentiond in the title my questions are:-
    - What is the Difference between iphone Unlock T-Mobile and iphone Unlock Free-Sim?!
    - Did they both work Internationally?!
    - For the Unlock T-Mobile should i use their sim or i can use any sim directly?!
    Thanks

    Unlocked means unlocked and you can use any sim card and keep changing them and the phone will never lock if it is unlocked.
    Sim free, means that the phone is sold at full price without a sim card, but the phone will lock to the first sim card that you put in it.  A sim free phone will work internationally, but you will have to use a roaming plan with your phone company because the phone will be locked, so you CANNOT change it to a local sim card.
    If you have an unlocked phone, you can use it internationally by inserting a local sim card and the phone should then work and you won't have to pay increased roaming charges as you would with a locked phone.
    If you buy a T-Mobile phone that is unlocked, DO NOT activate it with their sim card or the phone will lock to T-Mobile and you will have to approach them to get it unlocked.  Use it with another sim card straight away and it will remain unlocked.

  • The Difference between Extending a Wireless network and WDS?

    I have an Extreme (n) and an Express (n).
    I want to make sure the signal is strong upstairs and share a printer (connected to the express) and use AirTunes. I also may add an external drive to the Extreme.
    What's the difference between Extending a Wireless Network and using WDS? Will there be a speed difference?
    Message was edited by: J. Christopher Edwards

    I think you don't get it
    If I have another draft N router that operates at 2.4G and I have only n devices I can still use WDS and it will connect using draft n in the 2.4G band.
    If one g device connects to the network will go in mixed mode.
    The AEBS will still report 130 Mbps for your n clients and 54 for your g clients.
    If the other router is g only obviously you can't connect between the two router at n mode but still the AEBS will be in mixed mode and not in g. The Extreme will still report 130 Mbps for the connected n clients.
    I can tell you that because I have actually implemented it am not taking off the documentation.
    The same device if I try to use the "extend n network" does not even see the AEBS but will happily keep the n in the WDS mode and though the bandwidth is halved it is still more than g.
    In any case enough for this!

  • Difference between SY-SUBRC EQ 0 and SY-SUBRC EQ ' 0 '

    Dear All,
    I am not from abap background.
    I have a simple question.
    what is the difference between sy-subrc eq 0 and sy-subrc eq '0'
    How does it impact a statement like this for example
    SELECT /BIC/ZAGENT /BIC/ZBATCH_MO /BIC/ZDOC_NUM /BIC/ZCUSTOMER
               /BIC/ZSTORE /BIC/ZLINE_NUM /BIC/ZMATERIAL /BIC/ZBARCODE
          FROM /BIC/AZO_AMVN100
          INTO CORRESPONDING FIELDS OF TABLE it_aquisition
          WHERE /BIC/ZAGENT EQ SOURCE_FIELDS-/BIC/ZAGENT
          AND /BIC/ZDOC_NUM EQ SOURCE_FIELDS-/BIC/ZDOC_NUM
          AND /BIC/ZOCFLAG = '1'.
        if sy-subrc EQ '0'.
          SELECT SINGLE /BIC/ZDOC_NUM FROM /BIC/AZO_PMVN300
            INTO v_docnum
            WHERE /BIC/ZDOC_NUM EQ SOURCE_FIELDS-/BIC/ZDOC_NUM
            AND /BIC/ZAGENT EQ SOURCE_FIELDS-/BIC/ZAGENT
    kindly help me with this.
    Pleae do a little more research before posting questions here...even if you are new to ABAP.
    Edited by: kishan P on Aug 24, 2010 10:00 AM

    Hi,
    Please refer [Wiki post|http://wiki.sdn.sap.com/wiki/display/ABAP/Sy-Subrc].
    hope it help you,
    regards,

  • Getting Big Headache, What is difference between Flash Lite 3.1 and Flash Player 7

    Hello, I am asking questions about the two similar yet different programs for Pocket PC version only:
    1) Which came first, Flash Lite 3.1 or Flash Player 7?
    2) If I have both in my Pocket PC, will there be product incompatibility?
    3) What is the difference between Flash Lite 3.1 and Flash Player 7.
    4) I have a Flash Lite 3.1 but uninstall information says "Flash Lite 3.1 for Opera Mobile", did you releaase this? Is this an illegal copy? A developer's copy?
    *I don't know exactly where I got it, but I got it from the HTC developer's forum: XDA-developers.com
    *I also use Opera mobile, a web browser for Pocket PC's.
    5) What is difference between Flash Lite 3.1 and Flash Lite 3.1 for Opera? Is the only difference is that Flash Lite Supports everything flash related, while Flash Lite Opera supports only flash in opera?
    Hi, I don't expect all answers, but I hope someone or someone from adobe support can clear some things up for me.

    The program under my "remove programs" list is specifically called "Adobe Flash Lite for Opera". The XDA forums people said along time ago that it was Flash Lite, and kept calling it Flash Lite, and not Flash Player 7.
    Now what about this:
    http://www.adobe.com/products/flashlite/version/
    The table shows the differences between FP 7 SDK, FL 2.1, and FL 3.1. And it's quite obvious that FL 3.1 has way more features than Flash Player 7. What does SDK mean? And why are you telling me FP 7 has more features?
    With this information, can you or anyone else provide any more details and clarification?

  • What's the difference between a not-initialed object and a null object

    hi guys, i wanna know the difference between a not-initialed object and a null object.
    for eg.
    Car c1;
    Car c2 = null;after the 2 lines , 2 Car obj-referance have been created, but no Car obj.
    1.so c2 is not refering to any object, so where do we put the null?in the heap?
    2.as no c2 is not refering to any object, what's the difference between c2 and c1?
    3.and where we store the difference-information?in the heap?

    For local variables you can't have "Car c1;" the compiler will complain.That's not true. It will only complain if you try to use it without initializing it.
    You can have (never used, so compiler doesn't care):
    public void doSomething()
       Car c1;
       System.out.println("Hello");
    }or you can have (definitely initialized, so doesn't have to be initialized where declared):
    public void doSomething(boolean goldClubMember)
       Car c1;
       if (goldClubMember)
           c1 = new Car("Lexus");
       else
           c1 = new Car("Kia");
       System.out.println("You can rent a " + c1.getMake());
    }

  • What is the difference between SAP NW PI7.1 and PI7.1 EHP1

    We have a customer using SAP PI7.1 EHP1. The application to be deployed
    isdeveloped on SAP Netweaver PI 7.1 SP06.
    We need to know if application developed and transported from PI7.1 is
    compatible with EHP1?
    Below are the Components used by the application .
    1) SSL communication using SOAP adapter
    2) Java mapping , Graphical mapping , XSLT mapping
    3) Customised EJB modules
    4) Adapter framework
    5) ALE layer for IDoc communication from ERP to PI
    6) RFC lookups to PI system and ERP system.
    Questions
    1)Will PI EHP1 be able to communicate with PI7.1 using SOAP adapter ?
    2) What is the difference between SAP NW PI7.1 and PI7.1 EHP1 ?
    Regards,
    Sneha

    Hi,
    EHP Pi7.1 new
    IPv6 Support in SAP Systems (new)
    Async/Sync and Sync/Async Bridge in the JMS Adapter (New)
    High Availability (New)   Locate the document in its SAP Library structure
    Use
    A new concept is available for setting up a high availability environment for SAP NetWeaver Process Integration (PI). To do this, you need SAP Web Dispatcher for load balancing, and you must reconfigure your HTTP, RFC, and RMI connections so that they can be used for load balancing. You must also make various configuration steps in other components of your PI environment.
    [Level 4: Document: XML to Text Conversion Module (New)] XML to Text Conversion Module (New)
    Message Packaging (New)
    Monitoring Milestones (New)   Locate the document in its SAP Library structure
    Use
    You can use the new scenario variant Monitoring Milestones of the Business Process Management scenario to define a monitoring process that can monitor events from different applications. A monitoring process can subscribe to events from SAP or non-SAP systems.
    check  given Link
    http://help.sap.com/saphelp_nwpi711/helpdata/en/61/8c3842bb58f83ae10000000a1550b0/frameset.htm
    Regards,
    Amit

  • What is the difference between component(Y, Pb, Pr) and component(R,G,B)?

    [I previously posted this question in another thread as hadn't realised how to post new question]
    Q. What is the difference between component (Y, Pb, Pr) and component (R,G,B) ?
    I’d previously thought I was reasonably savvy on all things HD, but when I turned my thoughts to looking into getting a mac mini to run part of my home cinema I realise I have some confusions around the above.
    Here’s what I think I know:-
    The mac mini has a DVI output of the type which can output both digital and analogue, and so via physical adapters it could be used to connect to displays that take HDMI or VGA style RGB leads.
    I know on the market I can get a DVI to Component cable lead which would therefore lead me to assume it could drive my HD plasma with component input (Y,Pb,Pr), as I currently drive the HD TV via component cable with a SKY HD box (720p and 1080i), an xbox 360 (720p) and a progressive scan DVD player (480p), all through a Denon AV-amp.
    The problem is, I’ve heard somewhere that the DVI to component is R,G,B only and that it is not Y, Pb, Pr which is making me wonder it a) this will work and b) if I really understand component video afterall.
    I notice the Apple TV outputs Y,Pb,Pr but colours them red, green and blue, so am even more confused….
    Hopefully someone can help educate me on this !

    Thanks for this.
    My Plasma is a Panasonic 42" Viera March 2005 model. No HDMI, No VGA.
    It can process signals up to 720p and 1080i via the component (an interestingly it makes a huge difference over SD even though the native panel is 480..!?!)
    Am I right in thinking that the iPod component cable will also be R,G,B and therefor might be a suitable trial? Ie. if the TV accepts the input from the iPod then it should work for the mini?
    Only other thing of note is I'm doing all this via my Denon 1707 AV amp which does have the facility of upscaling, but I imagine it needs to stick to one format?
    Thanks.

  • Difference between F.35 Receivables amount and FBL5N report open items

    Hi All,
    There is an amount difference between f.35 receivables amount and fbl5n open items amount, I have observed that there are some changes to credit master like risk category and credit representative group, so I thought if we run f.28 it will be right but still difference exits.
    If anybody has come across similar issue or if you have any idea on this on how to analyze, please let me know.
    Regards,
    RK.

    Hi ,
    Please check the time horizon in credit check used. then compare it with FBL5n.
    May be there will be difference in comparison period.
    Program RFDKLI20 or F.28 is to run when there is changes in Assignment from company code, entry in customer master data, entry in sales area data, user exit., currency of credit control area , Assignment of customers to credit accounts.
    And
    Program RVKRED09.--> only the risk class was changed it is sufficient to run
    Regards
    Atul

  • Difference between sales order schedule line and item level data

    Hi All,
    Could you please let me know what is the difference between sales order schedule line and item level data?
    Thanks,
    Ramya

    Hi Ramya,
    Sales order schedule line contains del date, order qty, rounded qty, confirmed qty, delivery qty, schedule line category, purchase requisition etc.,  ie It contains the full details of sales order data with respect to the scheduled line of delivery.  The total quantity of a sales order item can be subdivided into schedule lines that contain the various subsets with the corresponding delivering dates.
    Sales order Item level data contains details of the item in the sales order like material code, net price, net value, UoM, PO details, reason for rejection if any, material group,billing date, plant etc., ie this
    contains the full details of item irrespective of scheduled line.
    Regards,
    R. Senthil Mareeswaran.

  • What is the difference between Safari 5.1.7 and 5.1.10? I can not log on to my website, so that their customer service has said that they are using Safari 5.1.7, and I use 5.1.10 (which I have installed on my computer, Mac)

    what is the difference between Safari 5.1.7 and 5.1.10?
    I can not log on to my website, so that their customer service has said that they are using Safari 5.1.7, and I use 5.1.10 (which I have installed on my computer, Mac)

    Might be the security fixes >  Safari 5.1.10 for Snow Leopard

  • Is there a noticable difference between2.3 ghz, 2,6ghz and 2.7ghz. and is it worth paying to upgrade from 2.3ghz to a higher amount of ghz

    is there a noticable difference between 2.3ghz, 2.6ghz and 2.7ghz and is it worth the upgrade to a higher amout of ghz

    going from 2.3GHz to 2.7GHz you might notice the difference.....
    but going from 2.6GHz to 2.7GHz, don't even waste your money....
    if you'll be using it for everyday use, then 2.3GHz will do just fine....
    however, if there's photoshop and some video editing happening, then 2.6GHz would be better suited for you....
    or, go with the 2.3GHz base model then upgrade it to 16GB of RAM and add a SSD to get the best price - performance ratio...
    good luck...

  • How to get date difference in terms of years,months and also days

    Tool : Eclipse
    Framework : JSF & Springs
    JRE : jdk1.5.0_06
    Iam using oracle 10G DB as back end.I have two date fields in a table.
    1)premium_paying_start_date
    2)premium_paying_end_date
    Iam getting these two dates from the database and storing these values within a entity.Now in the delegate layer,
    i have to get the premium_term i.e, the difference between the two dates(premium_paying_end_date-premium_paying_start_date).
    The difference should show the year,month and no of days difference.
    For example :
    premium_paying_start_date : 14-10-1984
    premium_paying_end_date : 01-03-2008
    Difference should be : 23 Y : 4 M : 15 D (Y = years, M = months , D= days)
    So please give me the solution for this.

    Difference should be : 23 Y : 4 M : 15 D (Y = years, M = months , D= days)
    So please give me the solution for this.How did you determine what the difference should be?
    ~

  • What are the major differences b/w live copy blueprint and Language copy of CQ ?

    We are in process of creating a different Language Versions of a Website and trying to figure out the best/recommended approach.
    what are the major differences b/w live copy blueprint and Language copy of CQ ? which one is recommended in which ? any pointers on this would be appreciated.

    The language copy tool is a one-shot tool to create pages under a certain structure. It has a nice UI for it. But that's it.
    The MSM blueprint/livecopy concept is much more powerfull, because it has live connections between the blueprint and the livecopy. It does not only allow you to easily create livecopies, but supports you also in maintaining the relationshop between these. So you can easily detect, that the blueprint page has been updated and needs to be rolled out again. Or that there are conflicts, because both blueprint and livecopy have been updated independently. And so on.
    From my perspective the language copy tool should not be used, because with creation of language pages the "fun" has just started and the real work is just ahead.
    Jörg

Maybe you are looking for

  • Photo events not showing up in alphabetical order

    Hi there all, why aren't my photo events showing up in chronological order? It appears like it starts with events from 2007, then works backwards from there as I scroll down. Then, after it gets through my earliest pics, it gets to my latest stuff. V

  • Changing database to noarchivelog mode during impdp

    Hi Guys, I am using Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production on RHEL5. I am in the middle on the impdp and I want my database to run on noarchivelog as it creates a lot of archivelogs. Will it be proper if I stop t

  • Installing LR 3.6 trashed all USB drivers; now installed LR3.5 won't open.  Help!

    Downloaded LR 3.6 yesterday.  Installed.  (To upgrade from LR 3.5).  It damaged all USB drivers on my PC (XP Pro 32 bit).  Still working with Dell tech support to resolve.  Now installed LR 3.5 will not open.  After system restore to day before yeste

  • Why is the network so slow on one computer? everything freezes! help!

    we have three computers all networked together, sometimes 4, and it works really well, until it comes into contact with the one computer. It has the same programs, same spec etc, but if I try to connect to it there are 3 hour waits for a tiny file to

  • Return Damage order..

    HI, I have created sales order with 5qty for material A. Now , 3qty damage in transit, so we have to give another 3qty for material A to our customer. could you tell me where do I mantain this return damage material? I have tried to create return dam