BlazeDS - n:m relation with eager loading - recursion?

Hello to all!
I have a n:m relation and I do eager loading with Hibernate (and other relations with 1:n and n:m, but not displayed here):
@ManyToMany(fetch=FetchType.EAGER)
    @JoinTable(name = "Group_User",
        joinColumns = {@JoinColumn(name="group_id", referencedColumnName="id")},
        inverseJoinColumns = {@JoinColumn(name="user_id", referencedColumnName="id")}
@Fetch(FetchMode.SELECT)
private List<User> users;
@ManyToMany(mappedBy="users", fetch=FetchType.EAGER)
@Fetch(FetchMode.SELECT)
private List<Group> groups;
So one user can have several groups and in one group can be several users.
So, but now I get all groups in Flex frontend and so I have also all users included, but the problem is, I get a kind of recursion here.
Debugging it and take a look at the groups, I see the users listed, and the user have groups, and these groups have users and so on and so on...
What shoud I do to solve this problem?
Thanks a lot in advance & Best Regards PHANTOMIAS

Abe, Any chance you could publish the answer on the newsgroup?
This was my support response:
I assume each child object is the same type as its parent? That is, you have a
class C with a
member of type Collection<C>?
In that case, consider what putting this member (let's call it M) in the
active fetch groups
does. When loading a C instance, M must be loaded. But if M is full of additional C
instances, then M must be loaded for all of those instances as well, since M is
in the active
fetch groups. And so forth. Thus, eager loading doesn't work very well when the
relation is
of the same type as the target object, because it causes a large recursive process.
SolarMetric has worked to make sure that JDO 2 fetch groups will allow for
specifications of
fetch depths and other advanced features. Until then, however, I'm afraid that
this is a
limitation of Kodo. I'm not sure how deep into your tree structure you want to
go, but you
might consider creating one or more Queries. For example, if you want children and
grandchildren, create one Query for all grandchildren, and one Query for all
children.
Execute both queries. Then going from a grandchild to its parent (I assume
there is a
relation from an object to its parent) won't cause any additional DB hits, since
the children
(the parents of the grandchildren) will already all be in cache. Similarly,
going from a child to
the root object might cause 1 additional DB hit if the root isn't already in
cache, but going
from subsequent children to the root will be satisfied from cache. Or if you
have multiple
roots, consider executing an additional Query for those roots. So in general,
you can fetch N
levels of the tree in N queries, and all relation traversals between those
levels will then be
satisfied from cache.

Similar Messages

  • Problem with delta load urgent!!

    Hi,
    I have a problem with delta load
    We have an IP, which loads data from R/3 system daily, its a delta load to the ODS and it updates to the cube with the selection on Company Codes and 0FISCPER
    we are in 3.5 system
    For a couple of company codes A & B, the init was done for the period 07.2010 to 12.2099 and after tht the deltas are loaded from 07.2010 till 12.2099 and there's no pblm with tht
    Now, there was some updation in R/3 system and the data was maintained for the company codes in A& B for the FISCPER 001.2010 to 006.2010, for which init wasnt maintained...
    now how shall we need to load the init in this case? dnt ask me how the postings was done in R/3, but my pblm is purely related to the loading data in BW from R/3, as its very imp for the customer to see the data from 01.2010 to 12.2010 in reports, but the data was only available in reports from 07.2010 onwards
    do i need to create another IP and maintain the init for 01.2010 to 06.2010? so tht this selection will automatically appear in the ODS delta loading infopackage
    pls throw ur inputs ASAP
    thank you

    Hi Prince,
    No need to maintain any Init for this data, It will be enough if you can load the data from jan 2010 to jun 2010 into your Info Cube.
    Follow the below steps:
    1)create full load IP for this data source.
    2) give the selection as A and B company codes and 0FISCPER as 001.2010 to 006.2010
    3) in menu bar, click on scheduler --> select full repair request
    4) In the next screen check the check box and save
    5) Now execute the IP, it will the data with out disturbing your daily delta.
    follow the same procedure to load data till to your Info Cube.
    Please revert if you have any questions
    Regards,
    Venkatesh

  • How to use Lazy and Eager loading dynamically

    Hi
    I am using JPA.I have a table which has one to many realtionship with another table. I want lazy loading by default and eager loading in a speciific case.
    Can we change this fetch type at the time of query?
    Thanks
    Sateesh

    In EclipseLink 2.1 there is also a LoadPolicy that allows a relationship to be loaded on a query.
    query.setHint("eclipselink.load-group.attribute", "d.employees");
    The difference between it and fetch, is that it is loaded normally (or as configured) not fetch joined.
    James : http://www.eclipselink.org

  • Relation between CPU load and # of users

    Dear all :
    is their a relation between # of cpus and cpu load
    if i have 100 concurent user how many cpu should dedicated to it ?

    from where can i get benchmark?From your brain.
    If I give you a benchmark, it will be valid with my load, not yours. You need to create a benchmark that reflects your load.
    I have no idea what kind of load you have. Nor does anyone else ...
    ... unless you have a OTS or COTS application (Off The Shelf or Customized Off The Shelf). In which case your vendor (or developer) should have some clue.
    (Refraining from comments about the majority of developers ...)

  • What is 'No marker update'? do opening balance have any relation with it?

    what is 'No marker update'? do opening balance have any relation with it? i know that 'No marker update' will not update reference point that means it will not change the opening balance date to current data, is it right? please explain.
    York

    Hi
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20handle%20inventory%20management%20scenarios.pdf
    When you load historic non cummulatives you need to set the "No Marker Updating" indicator if initalization has already taken place otherwise your data will not match with the stock on R/3 side.
    Raja

  • DAC - Can I run more then one Exection Plans with full load option enabled?

    Hello All,
    I have configured for subject Area sales – Orders, Backlog and Invoices (OBIEE)
    Now I want to run DAC to load the underline tables for subject Areas Financials – Revenue Analysis and Financials – GL Budget and Expenses, I have identified the relevant fact tables and built a Execution Plan in DAC.
    DAC - In which mode should I run the execution plan?
    With full load option enabled or disabled because already full load run is done for sales – Orders, Backlog and Invoices and this run should not disturb the existing data
    If I run with full load option enabled do it overrides the existing data for other subject area
    Please help me I am bit confused!
    Regards,
    SMA
    Edited by: SMA on Aug 18, 2009 3:36 PM

    No need of combining all the subject areas into one execution plan. Simply run the second ETL without checking the full load option. It will do the full load for the tables related to the newly added subject areas and incremental for the common tables between old and new subject areas.

  • HT1212 My daughter's iPod touch is stuck on a blank screen with the loading circle just going around and around. I tried to restore it, but it says I have to enter the passcode. I have the passcode, but as I said, there's nothing on the screen. How do I f

    My daughter's iPod Touch is stuck on a blank screen with that loading circle thing just going around and around. She said she was trying to duplicate an app or something, and all the the apps started shaking like when you delete them. I turned the iPod off, but it never turned back on completely. I tried to restore it, but it's saying that I have to enter the passcode. But, as I said, there's nothing on the sceen excect the circle thing. Please help!!!!!

    Start at # 3
    1-  iOS: Not responding or does not turn on
    2  Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    3 If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    4  Try on another computer                            
    5  If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • My Macbook pro keeps shutting down right after I log in. The power cord seems to be fine, so I think the computer has enough power. Right after logging in, it shows a grey background with a loading bar that loads only 1/4. Then it shuts down.

    I have had my Macbook Pro since 2011 and it has been great until now. Suddenly, I can no longer get past the grey screen just after I log in. The grey screen appears with a loading bar, and the bar get 1/4 of the way complete, then the computer shuts off. My power cord seems to be working fine because this problem still occurred after using another power cord (from another Macbook). Keyboard does not light up, and the small green lights on the left side of the computer do not light up (this is an older version and these light indicate how charged the computer is). It is using the OS X Yosemite and recently had total clearing of the hard drive as it was transferring from one owner to another, so the hard drive isn't nearly full enough to be causing this problem. I've never run into this problem before with other Macbooks.
    Help!

    Hi. When you were in the recovery drive doing permissions, did you try and run a repair of the boot drive? Did you try single user mode? Try these first and then go back and try to reinstall the operating system.When I say repair boot drive I don't mean permissions. There are both options in disk utilities.When you open disk utilities ,you will see in the left column  two drives plus possibly  a boot partition that look like an external driv. click on the second drive and in first aid use repair disk. If you still can't boot and it will not let you restore, you may have to do a clean install.   http://support.apple.com/kb/PH18869?viewlocale=en_US  

  • Issue with a load from R3 to BW 3.5

    Hi Guys,
    We are having an issue here with a load from R3 to BW 3.5 to an ODS and
    a transactional infocube.
    In a daily basis we are running loads to BW from R/3 infosets and all
    of them but one loads fine.
    The one that is having problems is actually the one that loads more
    data, therefore the infopackage is divided into two infopackages.
    In the update rule of the first ODS we are running an initial routine
    in which we are doing a RSDRD_SEL_DELETION (selective deletion) of the
    data to be loaded to both the ODS and the infocube, and is actually
    here where we got the core dump.
    Our first assumption was that maybe there was any yellow request in the
    transactional infocube avoiding the selective deletion but we have
    discarded this.
    We think that, as the only one failing is the one that divides into two
    infopackages, the problem might be that at the moment that the first is
    triying to delete the second one is loading data into the ods and there
    we get the dump.
    The question here is ¿Could this be the problem? ¿How could we
    workaround this if this is the case?
    Thanks for any suggestion.

    Hi,
    Be carefull on ODS activation, if you're using 2 infopackage and/or deleting data from an ODS which is lock for an activation, you'll occurs a dump.
    Check SM12 / ST22 / SM21 and job logs in SM37.
    And if pb still occurs for a load, debug it in start routine.
    Regards,

  • When connected to my Ford Mondeo, my ipod nano can be controlled through interface.  But after while it comes up with message 'loading data' and then freezes.  Anyone else got the issue?

    When connected to my new Ford Mondeo, my ipod nano can be controlled through user interface in car.  This worksd most of the time, but after a while if I try to change the music or search, it comes up with message 'Loading Data'.  I then have to pull out USB and reinseert, at which point it works again.  Has anyone esle expereinced this/have a solution?

    Does not matter if anyone else has this issue.  You need to contact the Ford dealership.  It's their product you are having problems with. 
    If you really want to know if anyone else has this issue, post on Ford's Mondeo message boards.  It's where the Ford car owners hang out.

  • How can I load data into table with SQL*LOADER

    how can I load data into table with SQL*LOADER
    when column data length more than 255 bytes?
    when column exceed 255 ,data can not be insert into table by SQL*LOADER
    CREATE TABLE A (
    A VARCHAR2 ( 10 ) ,
    B VARCHAR2 ( 10 ) ,
    C VARCHAR2 ( 10 ) ,
    E VARCHAR2 ( 2000 ) );
    control file:
    load data
    append into table A
    fields terminated by X'09'
    (A , B , C , E )
    SQL*LOADER command:
    sqlldr test/test control=A_ctl.txt data=A.xls log=b.log
    datafile:
    column E is more than 255bytes
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)

    Check this out.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch06.htm#1006961

  • Loading Objects with SQL*Loader

    When loading a column object with SQL*Loader, is it possible to specify a column specific 'TERMINATED BY' clause in the control file?
    I've successfully defined column-level termination characters for regular columns and nested tables, but can't seem to find any way of achieving the same result with column objects.

    When loading a column object with SQL*Loader, is it possible to specify a column specific 'TERMINATED BY' clause in the control file?
    I've successfully defined column-level termination characters for regular columns and nested tables, but can't seem to find any way of achieving the same result with column objects.

  • Sql@loader-704  and ORA-12154: error messages when trying to load data with SQL Loader

    I have a data base with two tables that is used by Apex 4.2. One table has 800,000 records . The other has 7 million records
    The client recently upgraded from Apex 3.2 to Apex 4.2 . We exported/imported the data to the new location with no problems
    The source of the data is an old mainframe system; I needed to make changes to the source data and then load the tables.
    The first time I loaded the data i did it from a command line with SQL loader
    Now when I try to load the data I get this message:
    sql@loader-704 Internal error: ulconnect OCISERVERATTACH
    ORA-12154: tns:could not resolve the connect identifier specified
    I've searched for postings on these error message and they all seem to say that SQL Ldr can't find my TNSNAMES file.
    I am able to  connect and load data with SQL Developer; so SQL developer is able to find the TNSNAMES file
    However SQL Developer will not let me load a file this big
    I have also tried to load the file within Apex  (SQL Workshop/ Utilities) but again, the file is too big.
    So it seems like SQL Loader is the only option
    I did find one post online that said to set an environment variable with the path to the TNSNAMES file, but that didn't work..
    Not sure what else to try or where to look
    thanks

    Hi,
    You must have more than one tnsnames file or multiple installations of oracle. What i suggest you do (as I'm sure will be mentioned in ed's link that you were already pointed at) is the following (* i assume you are on windows?)
    open a command prompt
    set TNS_ADMIN=PATH_TO_DIRECTOT_THAT_CONTAINS_CORRECT_TNSNAMES_FILE (i.e. something like set TNS_ADMIN=c:\oracle\network\admin)
    This will tell oracle use the config files you find here and no others
    then try sqlldr user/pass@db (in the same dos window)
    see if that connects and let us know.
    Cheers,
    Harry
    http://dbaharrison.blogspot.com

  • Loading "fixed length" text files in UTF8 with SQL*Loader

    Hi!
    We have a lot of files, we load with SQL*Loader into our database. All Datafiles have fixed length columns, so we use POSITION(pos1, pos2) in the ctl-file. Till now the files were in WE8ISO8859P1 and everything was fine.
    Now the source-system generating the files changes to unicode and the files are in UTF8!
    The SQL-Loader docu says "The start and end arguments to the POSITION parameter are interpreted in bytes, even if character-length semantics are in use in a datafile....."
    As I see this now, there is no way to say "column A starts at "CHARACTER Position pos1" and ends at "Character Position pos2".
    I tested with
    load data
    CHARACTERSET AL32UTF8
    LENGTH SEMANTICS CHARACTER
    replace ...
    in the .ctl file, but when the first character with more than one byte encoding (for example ü ) is in the file, all positions of that record are mixed up.
    Is there a way to load these files in UTF8 without changing the file-definition to a column-seperator?
    Thanks for any hints - charly

    I have not tested this but you should be able to achieve what you want by using LENGTH SEMANTICS CHARACTER and by specifying field lengths (e.g. CHAR(5)) instead of only their positions. You could still use the POSITION(*+n) syntax to skip any separator columns that contain only spaces or tabs.
    If the above does not work, an alternative would be to convert all UTF8 files to UTF16 before loading so that they become fixed-width.
    -- Sergiusz

  • Ipod touch wont turn on i tried restoring it but every time i do it just says its waiting for the ipod to respond. meanwhile my ipod is no longer a black screen but the apple logo with a loading bar underneath that after leaving for 8 hours hasnt moved.

    my ipod touch wont turn on ive tried restoring it but every time i do it just says its waiting for the ipod to respond. meanwhile my ipod is no longer a black screen but the apple logo with a loading bar underneath that after leaving for 8 hours hasnt moved.

    Try:
    - Another cable
    - Another USB port
    - Reboot the computer
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

Maybe you are looking for