Adding object to collection outside of unit of work?

Hi,
Tried to find the answer in this forum but difficult to know what keywords to use...anyway
What I am trying to do is so simple I can only believe I am missing the point somewhat ;-)
I have an object Licence that has a Set of LicenceHolders. I have a licence already saved in the db and the application now has cause to add a licenceHolder. I create the licenceHolder as a new object then get the licence out of the db, add the licenceHolder to the Set, then I make a call to my data persistance business class to make the save to the database. I.e. I have a separate layer to do the persistance from my business logic. The latter being the specific method to say 'add a licence holder to the licence', the former being 'save the licenceHolder, and update the link table between the licence and licenceHolder' (m - m relationship).
The problem I have is that in my business method licence.addLicencee(licenceHolder) doesn't save my licenceHolder and link table if I don't include the bold line below. This does work but see below for more comments
code snippet for business method....
// lm is the persistance method that gets licence from db
PremisesLicence licence = (PremisesLicence) lm.getLicence(premisesLicenceId);
// licenceePerson - new object not yet persisted
licence.addLicenceHolder(licenceePerson);     
//lhm is another persistance method to save licenceePerson and update licence_licenceHolder link table
lhm.addLicenceHolder(licenceePerson, licence);
code for lhm...
public void addLicenceHolder(ILicenceHolder licenceHolder, Licence licence) throws DataAccessException {
UnitOfWork uow = aSession.acquireUnitOfWork();
try {
     Licence licenceClone = (Licence) uow.readObject(licence);
licenceClone.addLicenceHolder(licenceHolder);
     uow.registerNewObject(licenceHolder);
     uow.commit();
} catch (Exception e) {
     e.printStackTrace();
     throw new DataAccessException(e);
I don't believe I should have to do the bold line as it is business logic in the persistance logic. I have already (in business method) said 'this licence has this licenceHolder' why should I have to repeat it in the persistance layer too. This can only lead to bugs in my software - I need all the help I can not to introduce any more ;-)
Comments please?
Thanks
Conrad

We've been working with TopLink for a while now, and had some issues with what you are doing. The following way is how we interact with TopLink to enable modifications outside the UoW:
- When returning objects from you DAO layer always return a copy of the retrieved objects (try Session.copyObject()), not the object returned by TopLink.
- Do modifications to the copied objects
- Pass the modified object graph to the DAO layer and use uow.mergeCloneWithReferences() to merge in differences
- Save to database with TopLink
From our experience, the reason you have to copy things is because what TopLink returns is the cached objects. So because you then will modify the cached objects, TopLink will not discover changes (comparing an object to itself will not give any differences). At least that was the only explanation we could find to our strange behaviour.
This is not a very efficient way to do things, and I think that if you are able to have a UoW open during this whole process it would be much more efficient. For an easy way to do this with web applications check out the TopLink integration with Springframework.
Please let me know if anyone has any feedback to this way of doing it. I know it's not ideal, but it is the best solution we found for detaching the objects.

Similar Messages

  • Error Adding object to collection

    Hi all... I'm using Toplink + ADF Faces...
    We have the following problem: There are 2 tables involved, table A and table B
    Table B has a FK to table A, therefore a one-to-one mapping from B to A and a one to many mapping (collection) from A to B.
    What I want to do is to add an object of type B to the collection of an A object. I'm showing an input form for the constructor of type B, a submit button, and a read only table bellow to show the items of the collection. I have done this several times and worked fine, now I have NO clue why this is not working.
    What I used to do to achieve this is to call the method of the type A "addB(B)" (to add the object) and then the "Execute" operation (to refresh the table shown) of the collection in which the addB method is adding objects.
    What I get is just:
    2006-11-17 13:53:30.421 WARNING JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
    2006-11-17 13:53:30.421 WARNING java.lang.NullPointerException
    and no more details.... :-S
    Does anyone know why this could be happening???
    or
    Is there some other way of adding objects to a collection using ADF and toplink?? Any suggestion is more than welcome!! I've been trying for too long to solve this... :-(
    Thanks in advance

    Here is another symptom:
    a few days ago, I developed a search page of objects of type "C". This type, has a collection of objects of type "B". This page is working fine, now... I do exactly the same steps to create a new page with the same search functionallity, and I get the same NullPointerException described above (with no extra information).
    Since the development of that working page until now, I manually added the mapping of table "A", which was not mapped by the time we developed the working search page. So I guess something is wrong with this new mapping.
    Here are the steps i did to map the new table "A" and define the relationship with table B (through a foreing key defined in DB):
    - created Java objects from tables for table "A".
    - added a FK from "B"->"A" in table "B" in the Offline Database Sources (just like the FK in the real DB)
    - added a ValueHolder attribute to class "B" (with the appropiate get and set, and initializing it in the constructor of class "B")
    - added a List attribute in class "A" of objects of type "B" (with the appropiates add, remove, get and set methods), and initializing the List as a new ArrayList in the constructor.
    - in the toplink map, mapped the new attributes:
    one-to-one for the Valueholder in class "B" (using the appropiate FK)
    one-to-many for the List attributes in class "A" (using the appropiate FK)
    - refreshed all possible datacontrol
    And thats it... am I doing something wrong or missing something??
    Is there any other way to map a new table into an existing toplink mapping? I'm using Jdev 10.1.3 Integrated workbench...
    I will really appreciate any suggestion or comment, I really have no clue why this is happening.... Thanks in advance

  • NullPointerException when adding object in a Collection

    Hello,
    I have this code:
    ----code----
    Group group = new Group("test");
    Collection col = null;
    col.add(group);
    ----code----
    The last line produces a NullPointerException.
    But group is a valid object.
    I don't understand why.
    Could you help me?
    Thanks
    Sylvain

    As a side note,
    If you are fairly new to Java, then its worth reading about the Collections API as you'll find yourself using it a lot. Its also a create example of how powerful interfaces are.
    In your code, try and make the compile time object a Collection and always pass the Collection interface around. (i.e. make the return type and parameter type of your methods Collection). This should let you do all the stuff you need e.g. getting objects out, putting them in and getting an iterator.
    Only tie the Colection to a particular implementation at Runtime, e.g.
    Collection c = new ArrayList();
    is a lot better than
    ArrayList c = new ArrayList();
    That way, if you decide later that a HashSet() is better than an ArrayList() for your purpose, you only need to change one line of code. HashSet still implements Collection so all your methods will still work.
    Hurrah for maintainable code!
    As you can tell, I like interfaces

  • After adding seperate performance collections to MAP 9.1 database, the database has become corrupted

    Hi,
    I have installed MAP 9.1(9.1.265.0) on my notebook, with Windows 7 Enterprise. The inventory of our environment was successfull and I have successfully added some performance collections to the database.
    First I ran the performance collection for one hour, then added a performance collection of one week. this was okay.
    Then I waited one week and added another collection of about five days. That collection would not stop: It was scheduled to run between 2014-07-28 12:49:31 until 2014-08-01 05:00:04. But it was still running at 2014-08-01 05:30:25. I waited for a little
    bit longer, but the collection kept on running according to the status screen.
    So I cancelled out of the collection at 2014-08-01 05:45. In the performance data it said that the colection ran from Jul 14 2014 08:04 AM until Aug 1 2014 4:57AM. So that looked okay.
    But now, when I try to Get the performance metrics data from MAP, it states that I have to do a "Refressh Assessment", because I problably have cancelled out of a collection. This "Refresh Assessment" wil run for about an hour and than
    completes with a message "Failed"
    I get these errors in the MapToolkit.log
    <2014-08-05 05:14:51.09
    AssessInventoryWorker@StoredProcAssessment,I> RunAssessment() - [Perf] [[Perf_Assessment].[ClearPerfdata]] : 125 ms
    <2014-08-05 05:14:56.13
    AssessInventoryWorker@StoredProcAssessment,I> RunAssessment() - [Perf] [[Perf_Assessment].[CreateTimeIntervals]] : 5039 ms
    <2014-08-05 05:22:47.76
    AssessInventoryWorker@StoredProcAssessment,I> RunAssessment() - [Perf] [[Perf_Assessment].[CreateMetricsPerTimeInterval]] : 471591 ms
    <2014-08-05 05:52:54.66
    AssessInventoryWorker@DataAccessCore,W> DoWorkInTransaction<T>() - Caught InvalidOperationException trying to roll back the transaction: This SqlTransaction has completed; it is no longer usable.
    <2014-08-05 05:52:54.79
    AssessInventoryWorker@DataAccessCore,W> DoWorkInTransaction<T>() - Caught a SQL transaction timeout exception. Will retry 3 more time(s). Retrying in 5000 milliseconds.
    <2014-08-05 05:53:15.86
    AssessInventoryWorker@DataAccessCore,W> OpenConnection() - Caught a SqlException trying to connect to the database.  Will retry connection 3 more time(s).  Retrying in 5000 milliseconds.
    <2014-08-05 05:53:20.99
    AssessInventoryWorker@DataAccessCore,W> OpenConnection() - Caught a SqlException trying to connect to the database.  Will retry connection 2 more time(s).  Retrying in 10000 milliseconds.
    <2014-08-05 05:53:45.00
    AssessInventoryWorker@DataAccessCore,W> OpenConnection() - Caught a SqlException trying to connect to the database.  Will retry connection 1 more time(s).  Retrying in 15000 milliseconds.
    <2014-08-05 06:24:03.69
    AssessInventoryWorker@DataAccessCore,W> DoWorkInTransaction<T>() - Caught a SQL transaction timeout exception. Will retry 2 more time(s). Retrying in 10000 milliseconds.
    <2014-08-05 06:54:13.91
    AssessInventoryWorker@DataAccessCore,W> DoWorkInTransaction<T>() - Caught a SQL transaction timeout exception. Will retry 1 more time(s). Retrying in 15000 milliseconds.
    <2014-08-05 07:24:28.99 AssessInventoryWorker@Analyzer,E> RunAssessments() - Assessment threw an exception:
    <2014-08-05 07:24:29.03
    AssessInventoryWorker@AssessInventoryWorker,I> AssessmentCompletedEventHandler: Assessment completed event.
    <2014-08-05 07:24:29.09
    AssessInventoryWorker@TaskProcessor,I> WorkerCompleted: Worker: 'AssessInventoryWorker'
    <2014-08-05 07:24:29.15 TID-16@TaskProcessor,I> Run: Completed. Status: Failed
    Is there maybe a restriction to the intervalls of adding performance collection data, or is there something else I am doing wrong?
    (I made a backup of the database after the first week of performance data, that database is still usable, so I can try to add more performance collections to that version of the database)
    I hope someone has an idea what is going on.
    Thanks!

    Time between isn't the problem. If you look in the log file, SQL is timing out. I think the problem is machine resources and time related. After the performance data collection has run for the predefined amount of time, MAP has SQL execute various assessments
    on the data to aggregate the raw data into something MAP can use. The more raw data that exists, the longer SQL will take and the more CPU and memory resources SQL will need.
    I would recommend that you have at least 4 cores or vCPU's and 6-8 GB of memory dedicated to the machine on which MAP is running. I would also follow the directions in this Wiki article to increase the timeout in MAP so that MAP will give SQL the time it
    needs to complete the job.
    http://social.technet.microsoft.com/wiki/contents/articles/10397.map-toolkit-increasing-the-sql-database-timeout-value.aspx
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • How do I preview objects that are outside of artboard.

    Hello,
    When I placed an illustrator file in Indesign, I would select command+D > select "Show Import Options" and we have a preview of the image. On some occasions, the preview will include all extraneous objects that are outside of the artboard and other times, it will display only the image within the artboard or bounding box. (Please see attached samples)
    Does anyone know the reason behind this?
    Thanks,
    Sutagami

    The only way I can reproduce what you are experiencing is if I save out as an .eps and am not mindful of the Artboard check box on the save dialog. If you deselect this check box you will get all of the file content, if you select this check box you will only get the designated Artboard bounding area. But you never said what file format your are saving or what version of Illustrator you are using. I have to assume you are in CS4.

  • TABLE / Object name of the organisational unit

    Hi,
    What's the table to found the object name of the organisationel unit (T-Code : PPOM)
    Thanks.

    Hi,
    Check T527X.
    Regards,
    Dilek

  • How to use object type collection in my function?

    Hi,
    I want to declare Object type collection with in my function like same a Record type collection. But it is saying error like below
    PLS-00540: object not supported in this context.
    Can anyone tell me how can i resolve this? I don't want to go with create object type functionality.
    Thanks

    Hi below is my full query.
    SELECT  czci.config_hdr_id,
            czci.config_rev_nbr,
            asoqla.quantity,
             (SELECT 
                    node_desc.LOCALIZED_STR
                 FROM   CZ_LOCALIZED_TEXTS node_desc,
                        CZ_PS_NODES ps_nodes,
                        CZ_CONFIG_ITEMS czci1
                WHERE   czci1.config_hdr_id = asoqld.config_header_id
                AND     czci1.config_rev_nbr = asoqld.config_revision_num
                AND    node_desc.INTL_TEXT_ID = ps_nodes.INTL_TEXT_ID
                AND     NVL(node_desc.LANGUAGE,userenv('LANG')) = userenv('LANG')
                AND     czci1.PS_NODE_ID = ps_nodes.PERSISTENT_NODE_ID
                 AND    ps_nodes.DEVL_PROJECT_ID = (SELECT MAX(DEVL_PROJECT_ID) FROM CZ_PS_NODES WHERE PERSISTENT_NODE_ID = czci.PS_NODE_ID)
                AND czci.PARENT_CONFIG_ITEM_ID IN (SELECT sub_sub.CONFIG_ITEM_ID FROM CZ_CONFIG_ITEMS sub_sub
                                                        WHERE sub_sub.CONFIG_HDR_ID = asoqld.config_header_id
                                                        AND sub_sub.CONFIG_REV_NBR = asoqld.config_revision_num
                                                        AND      sub_sub.PS_NODE_NAME = 'fittings')) fitting_material,
             (SELECT 
                    node_desc.LOCALIZED_STR
                 FROM   CZ_LOCALIZED_TEXTS node_desc,
                        CZ_PS_NODES ps_nodes,
                        CZ_CONFIG_ITEMS czci
                WHERE   czci.config_hdr_id = asoqld.config_header_id
                AND     czci.config_rev_nbr = asoqld.config_revision_num
                AND    node_desc.INTL_TEXT_ID = ps_nodes.INTL_TEXT_ID
                AND NVL(node_desc.LANGUAGE,userenv('LANG')) = userenv('LANG')
                AND     czci.PS_NODE_ID = ps_nodes.PERSISTENT_NODE_ID
                 AND    ps_nodes.DEVL_PROJECT_ID = (SELECT MAX(DEVL_PROJECT_ID) FROM CZ_PS_NODES WHERE PERSISTENT_NODE_ID = czci.PS_NODE_ID)
                AND czci.PARENT_CONFIG_ITEM_ID IN (SELECT sub_sub.CONFIG_ITEM_ID FROM CZ_CONFIG_ITEMS sub_sub
                                                        WHERE sub_sub.CONFIG_HDR_ID = czci.CONFIG_HDR_ID
                                                        AND sub_sub.CONFIG_REV_NBR = czci.CONFIG_REV_NBR
                                                        AND      sub_sub.PS_NODE_NAME = 'tubing')) tubing_material,
            NVL((SELECT czci.item_val
             FROM cz_config_items czci
             WHERE     czci.config_hdr_id = asoqld.config_header_id
             AND czci.config_rev_nbr = asoqld.config_revision_num
             AND czci.value_type_code <> 4
             AND czci.ps_node_name = 'control_circuit_name'),
             (SELECT 
                    node_desc.LOCALIZED_STR
                 FROM   CZ_LOCALIZED_TEXTS node_desc,
                        CZ_PS_NODES ps_nodes,
                        CZ_CONFIG_ITEMS czci
                WHERE   czci.config_hdr_id = asoqld.config_header_id
                AND     czci.config_rev_nbr = asoqld.config_revision_num
                AND    node_desc.INTL_TEXT_ID = ps_nodes.INTL_TEXT_ID
                AND NVL(node_desc.LANGUAGE,userenv('LANG')) = userenv('LANG')
                AND     czci.PS_NODE_ID = ps_nodes.PERSISTENT_NODE_ID
                 AND    ps_nodes.DEVL_PROJECT_ID = (SELECT MAX(DEVL_PROJECT_ID) FROM CZ_PS_NODES WHERE PERSISTENT_NODE_ID = czci.PS_NODE_ID)
                AND czci.PARENT_CONFIG_ITEM_ID IN (SELECT sub_sub.CONFIG_ITEM_ID FROM CZ_CONFIG_ITEMS sub_sub
                                                        WHERE sub_sub.CONFIG_HDR_ID = czci.CONFIG_HDR_ID
                                                        AND sub_sub.CONFIG_REV_NBR = czci.CONFIG_REV_NBR
                                                        AND      sub_sub.PS_NODE_NAME = 'pneumatic_schematics'))
             ) schematic_name
    FROM    aso_quote_lines_all asoqla,
            aso_quote_line_details asoqld,
            cz_config_items czci
    WHERE   asoqla.quote_header_id = 58455
    AND     asoqla.item_type_code = 'MDL'
    AND     asoqla.quote_line_id = asoqld.quote_line_id 
    AND     asoqld.config_header_id = czci.config_hdr_id
    AND     asoqld.config_revision_num = czci.config_rev_nbrBelow is my explain plan
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.11       0.11          0          0          0           0
    Execute      2      0.01       0.01          0          0          0           0
    Fetch        3      0.06       0.06          0       3429          0          19
    total        6      0.18       0.18          0       3429          0          19That's what i am planning to write each select queries in a pipelined function then join all the functions. If i run one each query it is giving less query fetch
    Thanks

  • Adding objects to list

    Hi,
    I am new java. I have a probelm adding objects to list. This is the following code.
    class Test{
    List <>dataList = new ArrayList<>();
    public List<A> getAList(){
    dataList.add(new A());
    return dataList ;
    public List<B> getBList(){
    dataList.add(new B());
    return dataList;
    }In the above code what I will pass<parameterized data> to the dataList decalred as member variable?

    bhanu wrote:
    nothing common for A and B. Both A and B are different pojos. but we can tell A and B extends from Object.I tried like that
    way. But it is not working. <? extends from Object>.Both two methods have to be in the same classYou do in that case have a bad design. Why is the same list used for both. It can't be type safe so you need to cast and the user of the list might get classcast exceptions during iteration.
    Kaj

  • Verizon Blocking Access to Mail Servers outside the United States

    I spent almost two hours with Verizon representatives yesterday after having spent 10 days in Canada without ever being able to access the pop.verizon.net email server.  Although the information does not seem to be well known throughout Verizon, several officials confirmed that as of September 14, Verizon has made the decision to block all IP addresses outside the United States trying to communicate with Verizon's email servers.  
    Parenthetically, Verizon Wireless was also unaware of this change in policy but was most interested to learn about it given the impact it would have.  It would also help explain why there were many customers who suddenly found their smartphones to be significantly less useful when traveling internationally.
    I asked repeatedly whether the Verizon community had been made aware of this change in policy and several individuals within Verizon confirmed that no such corporate communication was ever made, despite the fact that this change has a dramatic impact on those who travel outside the United States.  They conceded that this should have been done, but of course no one seems to know where the decision within the corporation was made about this policy and who might be "empowered" to actually consider the impact on the Verizon user community and communicate with it in a transparent manner.
    I find this behavior on Verizon's part to be appalling.  Even if security concerns drove this decision, I can't but help feel that it is Verizon's arrogance that led them to believe that this change in policy should not be communicated to the Verizon community.  
    I have made my view known to some individuals--would suggest that others do so as well--although I am skeptical that anyone within the Verizon heirarchy cares.  Hopefully I'm wrong.
    {edited for privacy}

    pfekete wrote:
    The response highlights the problems of dealing with Verizon.  It's totally non-responsive to the issue.
    In point of fact, I am not locked out of my individual account, nor do I have any difficulty in downloading emails from the pop.verizon.net email server when I am accessing it from a US-based IP address.  The problem is that IP addresses outside the US are being rejected.  Thus while traveling internationally and trying to access my account from a hotel, coffee shop, etc. the server is now programmed by Verizon not to respond.
    Thank you.
    {edited for privacy}
    We have asked them to clarify the message and they finally have, but not necessarily what you want to hear.
    "Additionally, we have implemented measures to prevent future unauthorized access attempts which may affect your ability to access your Verizon.net email from locations outside the U.S. If you experience difficulty reaching your Verizon.net email account, you can always access it online at mail.verizon.com or through the Verizon My FiOS app for mobile devices. For further information see the Verizon Webmail FAQs. "
    I think they are also still accepting whitelist requests for Foreign ISP's.

  • How can I download elements 13 outside the UNited States

    I live outside the United States.  How can I download Photoshop Elements 13?  It doesn't allow me to off of the Adobe site. Can I download from Amazon successfully? 

    Download Photoshop Elements 13 from Download Photoshop Elements products | 13, 12, 11, 10

  • AIP-18510:  Error adding objects to configuration ... for business process.

    Hello,
    We are encountering this error few days after applying latest MLR patch.
    None of our agreements can be deployed, even those that were not changed in any way after the patch was applied.
    This is part of our ui.log:
    2009.02.02 at 08:49:10:409: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) Formatted message
    2009.02.02 at 08:49:10:409: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) Formatted message
    2009.02.02 at 08:49:10:409: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) Rendering Page::pages/deployment/deploy_progress
    2009.02.02 at 08:49:10:421: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) In getVersionOnly()
    2009.02.02 at 08:49:10:965: Thread-24: IP - (ERROR) Error -: AIP-18510: Error adding objects to configuration CONFIG for business process cm_all_agreements
         at oracle.tip.configuration.B2BConfigurationBuilder.run(B2BConfigurationBuilder.java:452)
         at java.lang.Thread.run(Thread.java:534)
    2009.02.02 at 08:49:20:651: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) Found Non Validation Errors
    2009.02.02 at 08:49:20:651: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) Formatted message
    2009.02.02 at 08:49:20:651: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) Formatted message
    2009.02.02 at 08:49:20:662: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) Rendering Page::pages/deployment/deploy_error
    2009.02.02 at 08:49:20:673: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) In getVersionOnly()
    2009.02.02 at 08:49:27:961: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) Rendering Page::pages/deployment/config_list
    2009.02.02 at 08:49:27:971: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) Executing Query::SELECT DISTINCT C.ID, C.CLASSTYPE, C.name, C.LifeCycleState, CA.aud_modified FROM TIP_Configuration_t C, TIP_Configuration_t_AUD CA WHERE C.ID = CA.ID AND C.LifeCycleState IN ('Active','Validated','Quiescing','Quiesced') AND CA.aud_modified IN ( SELECT MAX(aud_modified) FROM TIP_Configuration_t_AUD WHERE ID = C.ID GROUP BY ID) ORDER BY CA.aud_modified DESC
    2009.02.02 at 08:49:27:978: AJPRequestHandler-ApplicationServerThread-13: UI - (ERROR) In getVersionOnly()
    Please help as this renders our server useless.
    Best regards,
    Kamil

    Hi Kamil,
    I'm guessing you are talking about encountering these issues post MLR# 7 patch.
    Here are some of the things ypu could start off with:
    1. Check your LS Inventory to see if your patch was applied successfully
    2. Ensure that all the post installation steps were performed (in the readme file)
    3. You could rollback this patch and check if you are still getting the same error.
    4. After rollback, if your config works fine, rerapply the patch again and observe the effects.
    Thanks & Regards,
    Suhas.

  • Insertion using objects and update using queries in a single unit of work

    HI All,
    I have a set of objects that i want to insert and then perform some update queries ( direct queries ) on the inserted data in the same transaction. but when i register the objects and execute the update SQL's on the same data in a same unit of work, the update statements are executed first and then the inserts are happening, I've also tried with child unit of work and parent unit of work but the result is the same.
    Can any one suggest a way to do object insertion and sql updates in a single transaction, Thanks in advance
    Regards,
    Sai Krishna

    The UnitOfWork is an abstraction for the physical database query. By default nothing is actually written into the database until the UnitOfWork commits. This means making updates to new objects involves modifying them in-memory and then the updated values will be included in the INSERT during commit.
    If you are having difficulty finding the newly created objects you can enable the query conforming capabilities to have modified and new objects included in query comparisons without requiring them to first be written to the database.
    Doug

  • How do you use an iPhone outside the United States?

    I'm going on vacation with my family and I was wondering how can your iPhone 4S with Verizon Wireless to take pictures and listen to music without being charged for roaming if you'll be traveling outside the United States? I have heard that you can your iPhone if you turn on Airplane mode but I am not sure if this is true or do you have to turn off a certain thing on the iPhone?

    Airplane mode turns off all radios.
    The iPhone includes the ability to enable wi-fi and Bluetooth access with Airplane mode enabled so you can access the internet with your iPhone via an available wi-fi network and/or access a Bluetooth device such as speakers or a headset. Being able to place or receive and calls and the same for SMS/MMS and cellular data access is prevented with Airplane mode enabled.

  • Obtaining repair or replacemen​t service outside the United States

    Hello,
    I bought an Asus notebook at Best Buy last November and a GSP plan too.
    Now my notebook needs repair outside US.
    In the GSP plan we need pay the repair in a manufacturer authorized service center as indicated in the iten "I.  Obtaining repair or replacement service outside the United States: To obtain service outside the United States in accordance with your Plan, please locate a manufacturer authorized service center/depot and drop your product off for service."
    But i live in São Paulo (Brazil) and i don't know where are located the authorized manufacturer service centers to obtain repair.
    Can you help me someway?
    Can you indicate me somewhere i can repair my notebook at São Paulo/Brazil?
    Tks.

    Hello samrdg,
    I’m sorry your computer is requiring service, but I’m glad to hear that you purchased a Geek Squad Protection plan as it’s helpful for situations like this. While you are correct in that repair costs may be reimbursed, it can be hard to identify which service centers are authorized to repair your computer underneath your plan.
    Click here for more information on our international services and how you may obtain service. Please know though that international coverage will not apply to your computer in regards to the following:
    ·         Accidental Damage from Handling coverage
    ·         In-home/on-site service
    ·         Phone/web support
    ·         Preventative maintenance checks
    ·         One-time battery replacement coverage
    ·         One-time accessory replacement coverage
    ·         No Lemon Coverage
    If you have any questions or concerns, please don’t hesitate to ask.
    Best Wishes!      
    Alex|Social Media Specialist | Best Buy® Corporate
     Private Message

  • [SOLVED]txlive-localmgr: Can't get object for collection langukenglish

    Hi,
    I just had issues today with tllocalmgr not working at all. Every command hangs with:
    [jwhendy]$ tllocalmgr
    Initializing ...
    Can't get object for collection-langukenglish at /usr/bin/tllocalmgr line 103
    Line 103 in /usr/bin/tllocalmgr is:
    my %tlpackages = $tlpdb->archpackages;
    And $tlpdb seems to refer to this line:
    my $tlpdb = new TeXLive::Arch (root => $ROOT) || die "cannot read $ROOT/tlpkg/texlive.tlpdb"
    I tried removing ~/.texlive/texmf-var/arch/tlpkg/texlive.tlpdb to see what it would do and it just regenerated one and produced the same issue.
    The only google results for collection-langukenglish refer to /usr/share/texmf[-config]/tex/generic/config/language.dat. I checked that file out and commented out all languages except english seeing if that would help. No luck.
    Any other thoughts? I'm truly puzzled. I just installed some texlive packages from CTAN within the last week... two at the most. Is this on my end or perhaps with some momentary glitch in CTAN, like being out of sync somehow?
    John
    Last edited by jwhendy (2010-09-10 02:26:19)

    Hmmm. Wonder if it really was the mirror. After a few 'yaourt -R texlive-localmanager' and 'yaourt -S texlive-localmanager' iterations... the problem is gone!
    John

Maybe you are looking for

  • File Adapter - how to get the file count from a folder

    Hi All, I have a requirement that have to poll a directory when the file count is reached to number N (ex:number of files avilable in folder is 5) otherwise it should wait and not pick any of the files. Is it possible to get the file count from a fol

  • Automatic DB Processing

    guys i've created a database just for studing the oracle features so, i created a database with 12 GB in size just for test, with the idea of simulating a real production database. Here there are tables, views, triggers, procedures, indexes, etc. Wha

  • ITunes Equalizer acting up

    The equaizer is acting up.  Unless I move the 500Hz slider, everything is muffled.  When I change EQ selections (acoustic, loudness, etc_), they will hold for one song, and then go back to the "muffled sound" on the next tune. I am also having troubl

  • ITUNES causes my pc to shut down

    Whenever Itunes is running no matter what I'm doing, my computer shuts down and I uploaded the newest version and it still does it. Anyone out there able to help me figure it out? It is VERY annoying. Thank you

  • BADI for F-28 - Customer receipt

    Hi We are making one development. In that development, our requirement is after clicking one button, my F-28 (customer receipt) should be executed in background. My incoming bank account should be debited and selected invoices (i.e. customer line ite