Collection content and many-many relation

I have a collection mapped on an intermediate table with the many-many
system.
when I read the content of the collection, I find all the expected entries
but also container of the collection.
for example, if a person contains a collection of cars, in the collection I
find all the cars of the person but also the person.
Is there any explanation for that ?

First of all, I do not understand how it could be possible for a JDO
implementation to provide a heterogeneous collection whereas it is defined
in the jdo file that it is not heterogeneous.
In this case, I've defined in the metadata that the collection contains Cars
and Kodo return Cars and Persons.
My database is fully consistent and I do not understand how it could not be
consistent in such cases.
The same application is also used on other JDO implementations ( LiDO ) for
my tests and everything works well.
The differences between the application with LiDO and Kodo in this
application are only located in the settings and the mapping.
Here is my mapping, I think my setting are not involved in the problem :
<class name="Car">
<jdbc-class-map type="base" table="CARS"/>
<field name="id">
<jdbc-field-map type="value" column="ID"/>
</field>
<field name="name">
<jdbc-field-map type="value" column="NAME"/>
</field>
</class>
<class name="Person">
<jdbc-class-map type="base" table="PERSONS"/>
<field name="cars">
<jdbc-field-map type="many-many" element-column.ID="CAR_ID"
ref-column.ID="PERS_ID" table="PERS_CARS"/>
</field>
<field name="id">
<jdbc-field-map type="value" column="ID"/>
</field>
</class>
Unfortunately it is not possible to send my application nor to invest time
creating test-cases.
If you have some test-cases, I would be please to compare them to my
application.
Thx
"Abe White" <[email protected]> a __crit dans le message de
news:[email protected]...
Do the owner class and the collection's element type share a common
ancestor? If so, then have you checked to be sure that the database's
data doesn't have the owner in the collection, and Kodo isn't just
reading the data as-is?
Either way, I would check your application logic first. We have lots
and lots of customers using m-m relations, and no one has ever reported
an error like this. It also hasn't shown up in any of our internal m-m
tests. So my first guesses are that either your database's data has the
owner within the collection, or you are putting the owner in the
collection in your application logic.
If you find that this is not the case and can reproduce the problem,
please send your test case to [email protected] and we'll be
happy to check it out.

Similar Messages

  • Dynamic content and Generating in many formats from RH HTML

    Hi,
    Working in RH HTML
    1. I was looking for info/thread which gives an idea on how
    to have one content used in many projects and chaning that on
    content would effect each project. ie. If I have a HTML project
    created and need a specific topic to display another topic/html
    file outside that project, how can I do this? And also when I
    change anything in the master topic/html it should effect all other
    projects were am using this file. OR if this is not possible how
    can I get another topic/html file to display in a different
    project?
    2. I generated my HTML project into many formats e.g.
    PDF,WORD,HTML,WEBHELP and so on.
    Am using a template (.htt ) to add Header and Footer to all
    the topics in the project. But when I go and view the pdf,word file
    the header and footer is not there. Though I can see this header
    and footer in the .chm file created
    How can I make this header and footer visible in the pdf,word
    files?
    Thx
    Kewal

    Take a look at the topics on Customising | Terminology and
    Printing on my sites. It covers what can be done.
    In short there are ways of getting the same info into more
    than one topic in one project but not more than one. However, the
    drawbacks may not suit.
    You will lose headers and footers when you generate printed
    output.

  • After installing lion and updating to pages 4.1 cannot view my document content after I open the document.  Shows how many pages I have and how many words in word count, but no words...

    after installing lion and updating to pages 4.1 cannot view my document content after I open the document.  Shows how many pages I have and how many words in word count, but no words...

    Same problem. Tried reinstalling Pages. Didn't help. The behavior is like I am typing with a white font on a white background, but I am not.

  • My ipad mini has many emails which say 'no content' and are not deletable.  What are they are how do I delete them?

    My ipad mini has many emails which say they have no content and I cannot delete them.  The emails do not show up on my MacBook Air.  What are they and how do I get rid of them? 

    Close the mail app and reset the iPad. Closing apps instructions are for iOS 7. If you're not running iOS 7, I assume that you know how to close apps in iOS 5 or 6. If you don't know how to close apps, just reset the iPad.
    To close an app, drag the app up from the multitasking display. Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • Many-Many Relation

    I'm using Sun ONE AS 7 for deploying an EJB jar containing several entitys with relations.
    I can use the methods set<Relation> and I can see the new data in the database system, it looks goods even the tables using for the many-many relations.
    But when I use the get<Relation> method and I try to access the Collection that returns that method I always found the next error:
    WARNING: CORE3283: stderr: java.lang.IllegalStateException
    WARNING: CORE3283: stderr:      at com.sun.jdo.spi.persistence.support.ejb.cmp.E
    JBHashSet.assertInTransaction(EJBHashSet.java:352)
    WARNING: CORE3283: stderr:      at com.sun.jdo.spi.persistence.support.ejb.cmp.E
    JBHashSet.iterator(EJBHashSet.java:295)
    ...I've traced the SQL statement executed by the S1AS and that statement works fine, so the problem is not in the DB system.
    Thanks in advance for your help.

    Hello,
    I got the same problem wit a 1:* Relation, but I can't find an error in my Transactions. All of them are marked as required and I use Container Managed Persistence.
    here is my error code:
    Caught an exception:
    java.lang.IllegalStateException
    at com.sun.jdo.spi.persistence.support.ejb.cmp.EJBHashSet.a
    EJBHashSet.java:339)
    at com.sun.jdo.spi.persistence.support.ejb.cmp.EJBHashSet.s
    t.java:192)
    at util.EmployeeDetails.toString(EmployeeDetails.java:142)
    at clients.TimeRecordClient.main(TimeRecordClient.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethod
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegati
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Ut
    5)
    at com.sun.enterprise.appclient.Main.<init>(Main.java:420)
    at com.sun.enterprise.appclient.Main.main(Main.java:92)
    Maybe someone could help me....

  • Read collection in one-to-many

    Hi,
    I have an object with a one-to-many relationship with another object.
    When I read the object through a read all object query and try to get the size of the collection object for each result the performance goes down. It gets 3 seconds to access the size of a collection for 400 entries. Hence, is there a way of getting this size in the query result, so that I do not have to access the collection object to get its size? Could not suceed with batch or join reads.
    Thanks.

    The problem is that when you send size() to the collection, you're reading in all the elements of the collection.
    You're on the right track about not accessing the collection to avoid lazy loading. One solution is to use a ReportQuery to return a count of the number of objects that match a specific criteria, say 'the count of all the objects of a certain class who's owner is a specified object'. You'll pay the cost of the query but not the cost of reading the collection contents.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • A resolution to many ID3 related issues

    If you search for problems with ID3 tags and iTunes you get a lot of result, and the problems people seem to have varies a lot. I myself have had problems for years and never figured it out before, but recently I got so annoyed and really wanted to get to the bottom if the issues I had.
    One problem that many experience seems to be that you update your ID3-tags from within iTunes and you put a lot of effort into keeping you music collection organized, and then for some reason when you play your song a couple of months later the incorrect id3-information that you removed is suddenly back!
    There are two different major versions of ID3; ID3v1 and ID3v2. And mp3 files can have both at the same time because some devices can't read ID3v2 and then they will fall back to ID3v1. The problem is that iTunes does not update the ID3v1 tag.
    I filed a bug in Apple Bug Reporter with ID 11432980 in May. No response yet...
    As long as you stick to iTunes you are good, but if you let other applications "touch" your music you are in trouble. Or to put it more correct, as long as you stick to iTunes, you won't see the problem.
    I use Traktor for DJ:ing and sometimes other applications to do stuff with my music. When I play songs in Traktor the songs gets analyzed for bpm etc, and the bpm field in the ID3 tag is updated by Traktor. When back in iTunes and I play the song again iTunes can see that the song has been "touched" and will read in the ID3 information from the file. And this is where you notice the problem, because iTunes then reads from both ID3v1 and ID3v2. So if you removed the album name from within iTunes then it only got removed from the ID3v2 tag, and when iTunes reads the information again it merges the ID3v1 and ID3v2 information and all the time you have put in organizing your collection is lost!
    My solution to the problem until Apple fixes the "bug", is that I have removed the ID3v1 tag completely. There are different ways and different applications to do this but I found ID3 Editor by Pa-software (http://www.pa-software.com/id3editor/) to work very well in my case. You can manually open the song in ID3 Editor from within iTunes using the bundled applescript from PA-software called "Edit selected tracks in ID3 Editor". What makes ID3 Editor stand out from the other applications I have tried is that you also get a command line interface that works great. The usage is as easy as "id3edcmd -rm1 /path/to/song.mp3" to remove the ID3v1 tag, and you can use this in any solution you prefer. I have modified their bundled applescript to execute this command instead of opening the file. So I execute this script on all songs I import and my problems are gone
    The script from Pa-software is copyrighted and I don't think I can post it here but I can post the part I wrote so you can use it yourself. You will of course need the ID3 Editor installed on your computer. I think they have a trial version but otherwise its only $15.
    repeat with this_track in these_tracks
                                  set this_name to the name of this_track
                                  set this_location to the location of this_track
                                  set this_location_posix to POSIX path of this_location
                                  set this_location_posix_quoted to quoted form of this_location_posix
                                  set command_line_action to the "/usr/local/bin/id3edcmd -rm1 " & this_location_posix_quoted
                   do shell script command_line_action
    end repeat
    And another trick for Traktor users is to don't let iTunes "Keep iTunes Media folder organized", because then iTunes will move your files if the ID3 information is updated, which causes problems if you have applications like Traktor that have references to songs in your iTunes Media folder. I only use the "Copy files to iTunes Media folder when adding to library".

    Please try this:
    DECLARE @T1 TABLE ( id INT, [exp] NVARCHAR(3))
    INSERT @T1
    ( id, [exp] )
    VALUES ( 3308, N'yes' );
    DECLARE @T2 TABLE ( id INT, cont_co NVARCHAR(100), last_name NVARCHAR(20))
    INSERT @T2
    ( id, cont_co, last_name )
    VALUES ( 3308, N'', N'' ) ,
    ( 3308, N'Company_Test', N'Previous3' ) ,
    ( 3308, N'Company_Test', N'Previous2' ) ,
    ( 3308, N'Test_Comp', N'Tester ' )
    DECLARE @T3 TABLE ( id INT , gna_dor_id INT , cont_co NVARCHAR(100))
    INSERT @T3
    ( id, gna_dor_id, cont_co )
    VALUES ( 3308, 45, N'Company_Test' ) ,
    ( 3308, 46, N'Test_Comp' );
    ;WITH s1 AS (
    SELECT a.id ,
    a.exp ,
    b.cont_co ,
    b.last_name , ROW_NUMBER() OVER (ORDER BY a.id ) AS rn
    FROM @T1 AS a
    LEFT JOIN @T2 AS b ON a.id = b.id
    ), s2 AS (
    SELECT x.id ,
    x.exp ,
    y.gna_dor_id ,
    y.cont_co , ROW_NUMBER() OVER (ORDER BY x.id ) AS rn
    FROM @T1 AS x
    JOIN @T3 AS y ON y.id = x.id
    SELECT *
    FROM s1
    full JOIN s2 ON s2.rn = s1.rn AND s2.id = s1.id;

  • How far will the extreme reach and how many users can be on there at the same time?

    How far will the airport extreme reach and how many users can be on there at the same time?

    Last question first, since that is the easy one......approximately 50 (fifty) users for wireless depending on how active each user might be.
    The first question is much more difficult, as distance is not really the issue with wireless.....obstructions are the issue.
    A wireless signal can easily travel 300 feet or more with no obstructions in the signal path.
    But, a typical wall of sheetrock or wallboard in a home will absorb....on average....15-20% of the wireless signal. Brick or adobe will obviously absorb much more. A ceiling....because it is thicker....will absorb about 25-35% of the signal.
    So, if the wireless signal must pass through several walls and a ceiling, there won't be much, if any, of the signal left....even though the distance that the signal travels is not great...for example, 20-25 feet.
    Other wireless networks around you at the neighbors can also affect the relative strength of the wireless signal.
    The bottom line....locate the AirPort Extreme where wireless devices will receive a signal with the least amount of obstructions in the signal path. Your actual performance cannot be predicted in advance. You will not know how well the AirPort Extreme works for you until you try it out in your home.
    If you find that the signal does not reach as far as needed,  you will need to add additional "extenders", like an AirPort Express to provide more signal coverage.

  • I synced with iMac itunes and got many more contacts than I want on the iPhone. How can I delete multiple contacts rather than having to do so one at a time?

    I synced my iPhone with itunes and iMac and got many more contacts than I wanted on my iPhone. How can I delete quite a few of them at one time as opposed to deleting one at a time?

    iTunes does not handle the import of photos/videos from the iPhone's Camera Roll.
    If this is not the computer you sync your iPhone with, you should have been provided a warning message that your iPhone is associated with an iTunes library on another computer and when trying to transfer any iTunes content from a different computer, a warning message is provided indicating that all iTunes content on the iPhone will be erased first.
    When connecting an iPhone to iTunes on another computer, none of the options under the various tabs for the iPhone sync preferences with iTunes are selected automatically. This means you had to select Sync Contacts under the Info tab for your iPhone sync preferences with iTunes on your wife's computer.
    Assuming you are syncing contacts with a supported address book app on your computer, connect your iPhone to Tunes on your computer and without syncing, under the Info tab for your iPhone sync preferences below the Advanced section, select Contacts for replace info on this iPhone followed by a sync.
    For importing photos/videos from the Camera Roll which can be done with a computer that is not used for syncing the iPhone since syncing with iTunes is not involved.
    http://support.apple.com/kb/HT4083

  • I have itunes directory on an external hard drive and want to direct a new installation of itunes on windows 8 to use it. I tried holding down ctrl and clicking itunes and after many tries got it to work one time. When I went back in later it had reverted

    I have itunes directory on an external hard drive and want to direct a new installation of itunes on windows 8 to use it. I tried holding down ctrl and clicking itunes and after many tries got it to work one time. When I went back in later it had reverted back to a blank version of itunes and I cant get ctrl to work again. Any other ideas?

    This is sometimes caused by a problem with the iTunesPrefs.xml file, normally found at C:\Users\<User>\AppData\Local\Apple Computer\iTunes\iTunesPrefs.xml. Try dragging this to the desktop and trying again.
    Alternatively the problem may be that you have McAfee AV and it is preventing iTunes from updating the same file and thus causing the problem. See Why does iTunes delete my itunesprefs.xml? for details.
    tt2

  • I'm using an iPhone 4 after upgrading to iOS 5 i'm getting an error 1635 now i'm facing problems syncing my contacts and facing many problems, i have restored my iPhone but still i'm getting the same error

    i'm using an iPhone 4 after upgrading to iOS 5 i'm getting an error 1635 now i'm facing problems syncing my contacts and facing many problems, i have restored my iPhone but still i'm getting the same error

    Did you check your security software settings? eliminating conflicts from third-party security software.

  • How can I get a list of emails in my inbox listed by sender and how many emails are in the box from each one, in a concise list.

    I need a List:
    Name of sender and how many emails from that sender:
    ex:
    Wife - 50
    Boss - 75
    ESPN - 200
    It would best to get them in a excel sheet so I can print, review and then make decisions to delete entire names that I know longer communicate with.

    See this thread here
    Display number of emails by sender

  • I'm a school tech coordinator. Many computers and many iPads. How many Apple IDs can I have per device, and how many devices can have the same Apple ID? To make my life easier, I'd like 200 devices to all use the same Apple ID.

    I'm a school tech coordinator. I have many computers and many iPads. I apologize if there is a some place that has all the rules governing the use of Apple IDs. I looked, and I even tried to get the answers from multiple Apple rep's. I couldn't find the answers.
    How many Apple IDs can I have per device?
    I want to use the same computer to sync and backup many iOS devices. The iOS devices would be associated with different Apple IDs.
    I may load apps under a school Apple ID and have users load their own apps under thier own ID.
    How many devices can have the same Apple ID?
    Can I use the same Apple ID on all the computers in a lab?
    Can I use the same Apple ID on all iPads for a particular grade level?
    Are the rules different for iOS devices and computers?
    I know that there are limits on "authorize" and "de-authorize" and how frequently those things can be done.
    Recently I heard that for the life of an iOS device, it can only be associated with five Apple IDs. That is not good for a school giving iPads to students in a 1:1
    To make my life easier, I'd like 200 devices to all use the same Apple ID.

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html
    It would be best to address your questions there, especially since this is a public forum, and over there you could post more private issues with this set-up. Not to mention, getting more official answers.

  • HT1296 i am new to apple, i have an itunes account and want to start collecting music ect. i also have an ipod and i have erased all content and i have a picture of a power lead entering a itunes logo?

    I am new to apple, i have an itunes account and want to start collecting music ect. i also have an ipod and i have erased all content and i have a picture of a power lead entering a itunes logo?

    Connect the iPod to your computer and restore via iTunes
    iTunes: Restoring iOS software

  • Good day! I have an iPod touch 4G and after many attempts I managed to updated it to ver. 6.1.5.

    Good day!
    I have had an iPod touch  version 4.1.2 for almost 4 years and after many attempts I manage to upated it to version 6.1.5.
    I then created an account with iCloud so that I could have my backups done directly to iCloud.
    I then restore the iPod to the backup I had on my computer but although it copied the photos, notes, contacts tc. it didn't copy the music I had on it.
    When I tried to sync my music from my iTunes on my PC I got a message stating that my iPod was previously sync to a DarklordPC, not a clue of who's PC this is and it's the first time this message came up. It gave me the option of erasing the sync of the DarklordPC and go ahead with a new sync, which I did, but it didn't sync at all.
    I've retried to sync numerous times and it tries to sync but after a few seconds it just stops.
    Can anyone help me please...I'm going crazy without my music

    You should have done this.
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
    Syncing to a "New" Computer or replacing a "crashed" Hard DriveSynced media like apps and music are not included in the iPod backup that iTunes makes and they restore from backup will not restore synced media unless the media is in the iTunes library.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store    

Maybe you are looking for