LK6.5 Modbus read/write to many addresses at once

LK6.5 Modbus read/write to many addresses at once. What happens as example; I have address 100 to 150 and 180-200. Addresses in between doesn't exist. Not all are connected. The modbus (Ethernet master) driver reads in a single command (in order to optimize) address 100-190.
That is a nice feature, but the result is a reply like "not existing" because between 150-180 are not existing. No error is shown in lookout (communication works OK).
I know I can do a workaround by setting maximum value per message to 1 or 2, but the project has 140 modbus objects with a total of around 4000 connections. I would like to use a big range in one command, but no addresses that are not existing. Beside of that, it looks like this is a problem that let the driver and/or lookout crash.
Any one knows a fast solution? Is there another updated modbus driver?

more inputs:
The response from Modbus device actually doesn't specify which address has the problem if you read a range.
When you read a range, and a certain address in this range doesn't exist, do you get no data in lookout?
It depends on the Modbus device whether lookout gets error response or the good response. I don't see detailed definition in the Modbus specification. So, if a certain address in a range doesn't exist, the device may either return error or good response. But the problem is that the error reponse is just an error code. Lookout doesn't know which address has the problem. It may be a problem that you don't see alarm in Lookout.
I don't see a way on lookout side to get a better behaviour. Maybe you can consult the device provider for any advice, such as what should the modbus master do, is the range read expected?
Ryan Shi
National Instruments

Similar Messages

  • Automotive Diagnostic Command Set & kwp2000 Read/Write Memory By Address

    I used NI Automotive Diagnostic Command Set 1.0 Read/Write EEPEOM By Address of ECU base VW TP2.0  KWP2000 diagnostic protocol . I used NI example ReadWrite Memory.vi but not successful. I know must use below step. 
    Description
    The usual procedure for getting a security access to the ECU is as follows:
    Request a seed from the ECU using RequestSeed.vi with access mode = n.
    From the seed, compute a key for the ECU on the host.
    Send the key to the ECU using SendKey.vi with access mode = n + 1.
    The security access is granted if the ECU validates the key sent. Otherwise, an error is returned.
    Who has used NI Automotive Diagnostic Command Set 1.0 and know VW TP2.0 KWP2000 protocol. Please support some suggest and example VI.
    Thanks

    I modify NI example Read/Write Memory lool at attached files.
    Now I know how to calculate the key and successful.But sometimes ok and sometimes no ok. The best luck is pass three error.
    Attachments:
    pho0.JPG ‏99 KB
    ReadWrite ECU.vi ‏66 KB
    seedaddkey.vi ‏12 KB

  • Sending to Many Addresses at Once

    Let's say I create an e-mail and put 20 e-mail addresses separated by commas
    in either the CC or BCC field.
    - if one of the addresses is bad - what happens to the email when sending:
    1 - nothing is sent???
    2 - all are sent ( except for the bad address)???
    3 - the addresses that were correct up to the point of the bad address were
    sent - and then the rest were not sent???

    revDAVE wrote:
    Let's say I create an e-mail and put 20 e-mail addresses separated by commas
    in either the CC or BCC field.
    - if one of the addresses is bad - what happens to the email when sending:
    1 - nothing is sent???
    2 - all are sent ( except for the bad address)???
    3 - the addresses that were correct up to the point of the bad address were
    sent - and then the rest were not sent???
    2 happens. all are sent but the bad address will bounce back as bad.

  • Read/Write permissions and saving prevented

    Hi!
    My hard drive failed last week, and while it was being replaced, the technician backed up the old one, replaced all my data onto the new one and upgraded me to 10.4.10, and then repaired permissions. He also replaced my keyboard, which had few to no letters painted on it (again). I'm the only user on this computer.
    Most things seem to be working well, but so far I've found that I'm not allowed to access my address book at all -- I'm being 'told' I have no read/write permissions for address book. I am also not allowed to save anything (not print to .pdf, not anything from Appleworks, not from textedit) except email as drafts. I have found a way to get around some of it, by trying to save directly to the hard drive, then I get asked to authenticate with my password, I do and it OKs that individual file. This works maybe 90% of the time, but not always on the first try.
    Oh, also I can't run anything in flash (I tried to go to a flash based website and it wouldn't work), and I was not able to download a flash player at all.
    Do these issues go together at all? I'm nervous that if I try to fix something, I'll make it worse.
    Thanks in advance for any ideas!
    iBook G4   Mac OS X (10.4.10)  
    iBook G4, iMac,    

    Hi Tttina, it sounds like permissions within your Home folder. To check, create a new account, name it "test" and see how your apps work in that User acct? (That will tell if your problem is systemwide or limited to your User acct.) This account is just for test, do nothing further with it.
    Open System Preferences >> Accounts >> "+" make it an admin account.
    If that works, then repair the Permissions inside your Home folder:
    • Navigate to YourHome/Library.
    • Get Info (Command - i) on folders for apps you are having problems with.
    • Open the "Ownership & permissions" disclosure triangle.
    • Make sure you are the owner, with "read and write" access.
    • Click on "apply to all"
    • If this is correct, open the "Applications Support" folder and do the same procedure (Command+I) for the folders with the names of the applications you are having trouble with.
    Note:
    The reason to do this is because repairing permissions with Disk Utility (as the tech did) doesn't touch permissions inside your home folder.
    -mj
    [email protected]

  • Read/Write a bit in a Modbus Address

    Greetings,
    I'm working on a project for a customer of mine. I'm working off of his I/O mapping list. We are using MODBUS to communicate to a Motorola MOSCAD FIU. According to the I/O Map, I need to read a bit from address 307682:01 which normal I would translate into 307682.1 but Lookout is not excepting this address as a valid Data Member. So I did some troubleshooting of my own and found that Modbus Data member (307682) is only used as "a 6-digit addresses of 16 bit input registers encoded as unsigned binary integers ranging from 0 - 65535." I guess an analog value.
    Is my thought process correct on this? Does my customer need to change his I/O mapping. Am I overlooking something?
    Attached is a copy of the I/
    O map.
    Oliver Scheurer
    Aegis Solutions, Inc.
    2660-T Yonkers Road
    Raleigh, NC 27604
    Phone: (919) 861-0103 Ext. 231
    Fax: (919) 861-0104
    www.aegis-solutions.com
    Attachments:
    IO_Map_for_lookout.xls ‏69 KB

    WOW!!.. I get to answer my own question. You all are slow... J/K...
    Anyway, the fine people at NI Tech Support Helped me out with this one. Seems that it is a problem related to Lookout and Modbus. After discussing this problem with a few engineers, I decided to call the customer and let him know of his mistake. Well, he proceeded to tell me that "Wonderware can do it with out a problem". So I called NI Support again, and they told me that further research showed that it is something that was not put into Lookout. The Support engineer started a "CARD?". But he also gave me a work around.
    1. create an expression
    2, enter getbit(3,1)
    This expression will return a ON status since the number 3 in binary is 1 1 and looking at the first bit is 1.
    So for my
    application I would use
    getbit(modbus1.307682,1)
    I hope this makes sense.
    Oliver Scheurer
    Aegis Solutions, Inc.
    2660-T Yonkers Road
    Raleigh, NC 27604
    Phone: (919) 861-0103 Ext. 231
    Fax: (919) 861-0104
    www.aegis-solutions.com

  • Unable to access only Read Write addresses of AB Micrologix 1400 PLC using NI DSC and NI OPC server

    Hi,
    I have been using NI DSC and OPC servers (NI and Kepware) to communicate with Allen Bradley Micrologix 1400 PLC (1766-L32BXB). Recently at one  site I found that I could access Process values from the PLC correctly (Read Only tags) but could not access the Read Write Tags at all. The latter are addresses to which it should be possible to write Set (i.e., references) values from MMI or PC software. I am able to do so from the MMI not from the PC software. I get communication error message on the MMI and PC, mentioning the PLC address being accessed (e.g. N7:0).
    Support from the supplier is not available. Hence can anyone let me know if ladder logic could have been written to prevent PC software based access of Read/write addresses (N7:0 to 9 in this case), while permitting access to Read only addresses? Is the problem at the PLC end or OPC server end? Is there a way to get around this?
    Thanks in advance.

    The OPC Server cannot force Outputs so if th registers in question are the outputs of ladder rungs you cannot write to them via the server. The controller will accept the write from the server but will not execute the write. In some cases the server event log will post an error if it is the PLC. Do you get errors when you try to write and if so what are the posted error messages.
    Fred Loveless
    Kepware Technologies
    http://www.kepware.com

  • How do I read/write many matrices through TCP server?

    I'm trying to modify the simple data client and the simple data server program in example in LabVIEW6i. How do I send a 2 dimension nummeric matrix? and also how do I send many numeric matrices at a time?

    The problem here is that at the receiving end, one cannot know how many
    bytes to read before unflattenning into the datatype.
    A method that works for *any* datatype (and any data transfer mechanism):
    Flatten the data to string.
    Flatten again the string to string; this adds a string lenght (U32) header
    to the string.
    Send the string.
    When receiving data, first read 4 bytes and convert to U32.
    Read this number of bytes.
    Typecast the string to the expected datatype.
    Jean-Pierre Drolet
    ----- Message d'origine -----
    De : "Mark Hanning-Lee"
    Groupes de discussion : comp.lang.labview
    Envoye : 6 septembre, 2001 22:21
    Objet : Re: How do I read/write many matrices through TCP server?
    > Lab Viewer wrote:
    > >
    > > Hi Irene,
    > > Re
    garding that example, probably you are wondering how can you pass a
    > > 2D array to Type Cast.VI (it accept only 1D array). The answer is
    > > Reshape Array.VI. Use this VI to transform your multidimensional array
    > > in a 1D array (after that use Type Cast.VI to transform it in a
    > > string). Also, you can use Array To Spreadsheet String.VI in order to
    > > obtain a string to send via TCP, but in this case the string is
    > > longer.
    >
    > Or better, wire the 2D array to the Flatten to String function, which
    > accepts any data type.
    >
    > When you receive the data, wire the string into the Unflatten from
    > String function. You'll need to wire a 2D array of the same
    > representation into the type input of that function.
    >
    > Mark
    LabVIEW, C'est LabVIEW

  • Read/write problem with Datasockets.

    Hi, I'm a newcomer to Labview, and I'm having a problem with Datasockets. When trying to create a 'Publish & Subscribe' socket between two machines it only works on one, the one whose dstp address is the local machine, the other being incapable of writing to this 'host' and displaying red LEDs, although it is reading from the host. Also I've only managed to set up these read/write connections using the right-click options, how is it done programatically? Any clarification on the issue (whether directly connected or not :-) would be appreciated. Many thanks,
    Tom

    Hi Lector!
    This is normal behavior for DataSocket. You want to run a DataSocket server on both machines. Although you can SUBSCRIBE to a DS server anywhere on the network, you can only publish to your local server. We do a LOT of Datasocket work here, and this has never been a problem. It's a real security bonus, as well.
    It's a good idea to split all your read and write functions. Although some front panel objects (knobs, particularly) can be controls and indicators simultaneaously, it's good practice, for a number of reasons, to NOT use both functions. I build "dummy" front panels for all my VI's which I distribute to all my colleagues who need to work with a remote instrument.
    You cannot really appreciate DataSocket, till you've tried to rem
    otely control something with PC Anywhere over a slow network! A bit of practice, and you'll wonder how you ever did anything without DataSocket. I'd be glad to work with you on any particulars. Good Luck!
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

  • How do you create default Read/Write Permissions for more than 1 user?

    My wife and I share an iMac, but use separate User accounts for separate mail accounts, etc.
    However, we have a business where we both need to have access to the same files and both have Read/Write permissions on when one of us creates a new file/folder.
    By default new files and folders grant Read/Write to the creator of the new file/folder, and read-only to the Group "Staff" in our own accounts or "Wheel" in the /Users/Public/ folder, and read-only to Everyone.
    We are both administrators on the machine, and I know we can manually override the settings for a particular file/folder by changing the permissions, but I would like to set things up so that the Read/Write persmissions are assigned for both of us in the folder for that holds our business files.
    It is only the 2 of us on the machine, we trust each other and need to have complete access to these many files that we share. I have archiveing programs running so I can get back old versions if we need that, so I'm not worried about us overwriting the file with bad info. I'm more concerned with us having duplicates that are not up to date in our respective user accounts.
    Here is what I have tried so far:
    1. I tried to just set the persmissions of the containing folder with us both having read/write persmissions, and applied that to all containing elements.
    RESULT -> This did nothing for newly created files or folders, they still had the default permissions of Read/Write for the creating User, Read for the default Group, Read for Everyone
    2. I tried using Sandbox ( http://www.mikey-san.net/sandbox/ ) to set the inheritance of the folder using the methods laid out at http://forums.macosxhints.com/showthread.php?t=93742
    RESULT -> Still this did nothing for newly created files or folders, they still had the default permissions of Read/Write for the creating User, Read for the default Group, Read for Everyone
    3. I have set the umask to 002 ( http://support.apple.com/kb/HT2202 ) so that new files and folders have a default permission that gives the default group Read/Write permissions. This unfortunately changes the default for the entire computer, not just a give folder.
    I then had to add wife's user account to the "Staff" group because for some reason her account was not included in that. I think this is due to the fact that her account was ported into the computer when we upgraded, where as mine was created new. I read something about that somewhere, but don't recall where now. I discovered what groups we were each in by using the Terminal and typing in "groups username" where username was the user I was checking on.
    I added my wife to the "Staff" group, and both of us to the "Wheel" group using the procedures I found at
    http://discussions.apple.com/thread.jspa?messageID=8765421&#8765421
    RESULT -> I could create a new file using TextEdit and save it anywhere in my account and it would have the permissions: My Username - Read/Write, "Staff" or "Wheel" (depending on where I saved it) - Read/Write, Everyone - Read Only, as expected from the default umask.
    I could then switch over to my wife's account, open the file, edited it, and save it, but then the permissions changed to: Her Username - Read/Write, (unknown) - Read/Write, Everyone - Read Only.
    And when I switch back to my account, now I can open the file, but I can't save it with my edits.
    I'm at my wits end with this, and I can believe it is impossible to create a common folder that we can both put files in to have Read/Write permissions on like a True Shared Folder. Anyone who has used windows knows what you can do with the Shared folder in that operating system, ie. Anyone with access can do anything with those files.
    So if anyone can provide me some insight on how to accomplish what I really want to do here and help me get my system back to remove the things it seems like I have screwed up, I greatly appreciate it.
    I tried to give as detailed a description of the problem and what I have done as possible, without being to long winded, but if you need to know anything else to help me, please ask, I certainly won't be offended!
    Thanks In Advance!
    Steve

    Thanks again, V.K., for your assistance and especially for the very prompt responses.
    I was unaware that I could create a volume on the HD non-destructively using disk utility. This may then turn out to be the better solution after all, but I will have to free up space on this HD and try that.
    Also, I was obviously unaware of the special treatment of file creation by TextEdit. I have been using this to test my various settings, and so the inheritance of ACLs has probably been working properly, I just have been testing it incorrectly. URGH!
    I created a file from Word in my wife's account, and it properly inherited the permissions of the company folder: barara - Custom, steve - Custom, barara - Read/Write, admin - Read Only, Everyone - Read Only
    I tried doing the chmod commands on $TMPDIR for both of us from each of our accounts, but I still have the same behavior for TextEdit files though.
    I changed the group on your shared folder to admin from wheel as you instructed with chgrp. I had already changed the umask to 002, and I just changed it back to 022 because it didn't seem to help. But now I know my testing was faulty. I will leave it this way though because I don't think it will be necessary to have it set to 002.
    I do apparently still have a problem though, probably as a result of all the things I have tried to get this work while I was testing incorrectly with TextEdit.
    I have just discovered that the "unknown user" only appears when I create the a file from my wife's account. It happens with any file or folder I create in her account, and it exists for very old files and folders that were migrated from the old computer. i.e. new and old files and foders have permissions: barara - Read/Write, unknown user - Read Only, Everyone - Read Only
    Apparently the unknown user gets the default permissions of a group, as the umask is currently set to 022 and unknown user now gets Read Only permissions on new items, but when I had umask set to 002, the unknown user got Read/Write permissions on new items.
    I realize this is now taking this thread in a different direction, but perhaps you know what might be the cause of this and how to correct or at least know where to point me to get the answer.
    Also, do you happen to know how to remove users from groups? I added myself and my wife to the Wheel group because that kept showing up as the default group for folders in /Users/Shared
    Thanks for your help on this, I just don't know how else one can learn these little "gotchas" without assistance from people like you!
    Steve

  • Windows Server 2012 - Hyper-V - iSCSI SAN - All Hyper-V Guests stops responding and extensive disk read/write

    We have a problem with one of our deployments of Windows Server 2012 Hyper-V with a 2 node cluster connected to a iSCSI SAN.
    Our setup:
    Hosts - Both run Windows Server 2012 Standard and are clustered.
    HP ProLiant G7, 24 GB RAM, 2 teamed NIC dedicated to Virtual Machines and Management, 2 teamed NIC dedicated to iSCSI storage. - This is the primary host and normaly all VMs run on this host.
    HP ProLiant G5, 20 GB RAM, 1 NIC dedicated to Virtual Machines and Management, 2 teamed NIC dedicated to iSCSI storage. - This is the secondary host that and is intended to be used in case of failure of the primary host.
    We have no antivirus on the hosts and the scheduled ShadowCopy (previous version of files) is switched of.
    iSCSI SAN:
    QNAP NAS TS-869 Pro, 8 INTEL SSDSA2CW160G3 160 GB i a RAID 5 with a Host Spare. 2 Teamed NIC.
    Switch:
    DLINK DGS-1210-16 - Both the network cards of the Hosts that are dedicated to the Storage and the Storage itself are connected to the same switch and nothing else is connected to this switch.
    Virtual Machines:
    3 Windows Server 2012 Standard - 1 DC, 1 FileServer, 1 Application Server.
    1 Windows Server 2008 Standard Exchange Server.
    All VMs are using dynamic disks (as recommended by Microsoft).
    Updates
    We have applied the most resent updates to the Hosts, WMs and iSCSI SAN about 3 weeks ago with no change in our problem and we continually update the setup.
    Normal operation
    Normally this setup works just fine and we see no real difference in speed in startup, file copy and processing speed in LoB applications of this setup compared to a single host with 2 10000 RPM Disks. Normal network speed is 10-200 Mbit, but occasionally
    we see speeds up to 400 Mbit/s of combined read/write for instance during file repair
    Our Problem
    Our problem is that for some reason all of the VMs stops responding or responds very slowly and you can for instance not send CTRL-ALT-DEL to a VM in the Hyper-V console, or for instance start task manager when already logged in.
    Symptoms (i.e. this happens, or does not happen, at the same time)
    I we look at resource monitor on the host then we see that there is often an extensive read from a VHDX of one of the VMs (40-60 Mbyte/s) and a combined write speed to many files in \HarddiskVolume5\System Volume Information\{<someguid and no file extension>}.
    See iamge below.
    The combined network speed to the iSCSI SAN is about 500-600 Mbit/s.
    When this happens it is usually during and after a VSS ShadowCopy backup, but has also happens during hours where no backup should be running (i.e. during daytime when the backup has finished hours ago according to the log files). There is however
    not that extensive writes to the backup file that is created on an external hard drive and this does not seem to happen during all backups (we have manually checked a few times, but it is hard to say since this error does not seem leave any traces in event
    viewer).
    We cannot find any indication that the VMs themself detect any problem and we see no increase of errors (for example storage related errors) in the eventlog inside the VMs.
    The QNAP uses about 50% processing Power on all cores.
    We see no dropped packets on the switch.
    (I have split the image to save horizontal space).
    Unable to recreate the problem / find definitive trigger
    We have not succeeded in recreating the problem manually by, for instance, running chkdsk or defrag in VM and Hosts, copy and remove large files to VMs, running CPU and Disk intensive operations inside a VM (for instance scan and repair a database file).
    Questions
    Why does all VMs stop responding and why is there such intensive Read/Writes to the iSCSI SAN?
    Could it be anything in our setup that cannot handle all the read/write requests? For instance the iSCSI SAN, the hosts, etc?
    What can we do about this? Should we use MultiPath IO instead of NIC teaming to the SAN, limit bandwith to the SAN, etc?

    Hi,
    > All VMs are using dynamic disks (as recommended by Microsoft).
    If this is a testing environment, it’s okay, but if this a production environment, it’s not recommended. Fixed VHDs are recommended for production instead of dynamically expanding or differencing VHDs.
    Hyper-V: Dynamic virtual hard disks are not recommended for virtual machines that run server workloads in a production environment
    http://technet.microsoft.com/en-us/library/ee941151(v=WS.10).aspx
    > This is the primary host and normaly all VMs run on this host.
    According to your posting, we know that you have Cluster Shared Volumes in the Hyper-V cluster, but why not distribute your VMs into two Hyper-V hosts.
    Use Cluster Shared Volumes in a Windows Server 2012 Failover Cluster
    http://technet.microsoft.com/en-us/library/jj612868.aspx
    > 2 teamed NIC dedicated to iSCSI storage.
    Use Microsoft MultiPath IO (MPIO) to manage multiple paths to iSCSI storage. Microsoft does not support teaming on network adapters that are used to connect to iSCSI-based storage devices. (At least it’s not supported until Windows Server 2008 R2. Although
    Windows Server 2012 has built-in network teaming feature, I don’t article which declare that Windows Server 2012 network teaming support iSCSI connection)
    Understanding Requirements for Failover Clusters
    http://technet.microsoft.com/en-us/library/cc771404.aspx
    > I have seen using MPIO suggests using different subnets, is this a requirement for using MPIO
    > or is this just a way to make sure that you do not run out of IP adressess?
    What I found is: if it is possible, isolate the iSCSI and data networks that reside on the same switch infrastructure through the use of VLANs and separate subnets. Redundant network paths from the server to the storage system via MPIO will maximize availability
    and performance. Of course you can set these two NICs in separate subnets, but I don’t think it is necessary.
    > Why should it be better to not have dedicated wireing for iSCSI and Management?
    It is recommended that the iSCSI SAN network be separated (logically or physically) from the data network workloads. This ‘best practice’ network configuration optimizes performance and reliability.
    Check that and modify cluster configuration, monitor it and give us feedback for further troubleshooting.
    For more information please refer to following MS articles:
    Volume Shadow Copy Service
    http://technet.microsoft.com/en-us/library/ee923636(WS.10).aspx
    Support for Multipath I/O (MPIO)
    http://technet.microsoft.com/en-us/library/cc770294.aspx
    Deployments and Tests in an iSCSI SAN
    http://technet.microsoft.com/en-US/library/bb649502(v=SQL.90).aspx
    Hope this helps!
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Lawrence
    TechNet Community Support

  • Unable to read one-to-many relations using Hibernate

    Hi,
    I am trying with a very simple one-to-many relationship. When I am storing the objects, there are no problems. But when I am trying to read out the collection, it says invalid descriptor index. Please help.
    Regards,
    Hibernate version:
    hibernate-3.1rc2
    Mapping documents:
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
         <class name="Parent">
              <id name="id">
                   <generator class="identity"/>
              </id>
              <set name="children">
                   <key column="parent_id"/>
                   <one-to-many class="Child"/>
              </set>
         </class>
         <class name="Child">
              <id name="id">
                   <generator class="identity"/>
              </id>
              <property name="name"/>
         </class>
    </hibernate-mapping>
    Code between sessionFactory.openSession() and session.close():
    The Parent class:
    public class Parent
         private Long id ;     
         private Set children;
         Parent(){}
         public Long getId()
              return id;
         public void setId(Long id)
              this.id=id;
         public Set getChildren()
              return children;
         public void setChildren(Set children)
              this.children=children;
    The Child class:
    public class Child
         private Long id;
         private String name;
         Child(){}
         public Long getId()
              return id;
         private void setId(Long id)
              this.id=id;
         public String getName()
              return name;
         public void setName(String name)
              this.name=name;
    The Main class:
    public class PCManager
         public static void main(String[] args)
              PCManager mgr = new PCManager();
              List lt = null;
              if (args[0].equals("store"))
                   mgr.createAndStoreParent(new HashSet(3));
              else if (args[0].equals("list"))
                   mgr.listEvents();
              HibernateUtil.getSessionFactory().close();
         private void createAndStoreParent(HashSet s)
              HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction();
              Parent p1 = new Parent();
              int size = 3;
              for (int i=size; i>0; i--)
                   Child c = new Child();
                   c.setName("Child"+i);
                   s.add(c);
              p1.setChildren (s);
              Iterator elems = s.iterator();
              do {     
                   Child ch = (Child) elems.next();
                   HibernateUtil.getSessionFactory().getCurrentSession().save(ch);
              }while(elems.hasNext());
              HibernateUtil.getSessionFactory().getCurrentSession().save(p1);
              HibernateUtil.getSessionFactory().getCurrentSession().getTransaction().commit();
         private void listEvents()
              HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction();
              Parent result = (Parent) HibernateUtil.getSessionFactory().getCurrentSession().load(Parent.class, new Long(1));
              System.out.println("Id is :"+ result.getId());
              Set children = result.getChildren();
              Iterator elems = children.iterator();
              do {     
                   Child ch = (Child) elems.next();
                   System.out.println("Child Name"+ ch.getName());
              }while(elems.hasNext());
              HibernateUtil.getSessionFactory().getCurrentSession().getTransaction().commit();          
    Full stack trace of any exception that occurs:
    When I run with "hbm2ddl.auto" property as validate and trying to list the contents, I get the following out put.
    C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc2\MyHibernate>ant run -Da
    ction=list
    Buildfile: build.xml
    clean:
    [delete] Deleting directory C:\Documents and Settings\mirza\Desktop\hibernate
    -3.1rc2\MyHibernate\bin
    [mkdir] Created dir: C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc
    2\MyHibernate\bin
    copy-resources:
    [copy] Copying 4 files to C:\Documents and Settings\mirza\Desktop\hibernate
    -3.1rc2\MyHibernate\bin
    compile:
    [javac] Compiling 5 source files to C:\Documents and Settings\mirza\Desktop\
    hibernate-3.1rc2\MyHibernate\bin
    run:
    [java] 09:09:23,433 INFO Environment:474 - Hibernate 3.1 rc2
    [java] 09:09:23,449 INFO Environment:489 - loaded properties from resource
    hibernate.properties: {hibernate.cglib.use_reflection_optimizer=true, hibernate
    .cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dial
    ect=org.hibernate.dialect.SQLServerDialect, hibernate.max_fetch_depth=1, hiberna
    te.jdbc.use_streams_for_binary=true, hibernate.format_sql=true, hibernate.query.
    substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.cac
    he.region_prefix=hibernate.test, hibernate.jdbc.batch_versioned_data=true, hiber
    nate.connection.pool_size=1}
    [java] 09:09:23,465 INFO Environment:519 - using java.io streams to persis
    t binary types
    [java] 09:09:23,465 INFO Environment:520 - using CGLIB reflection optimize
    r
    [java] 09:09:23,481 INFO Environment:550 - using JDK 1.4 java.sql.Timestam
    p handling
    [java] 09:09:23,559 INFO Configuration:1257 - configuring from resource: /
    hibernate.cfg.xml
    [java] 09:09:23,559 INFO Configuration:1234 - Configuration resource: /hib
    ernate.cfg.xml
    [java] 09:09:23,872 INFO Configuration:460 - Reading mappings from resourc
    e: PCMapping.hbm.xml
    [java] 09:09:24,013 INFO HbmBinder:266 - Mapping class: Parent -> Parent
    [java] 09:09:24,045 INFO HbmBinder:266 - Mapping class: Child -> Child
    [java] 09:09:24,045 INFO Configuration:1368 - Configured SessionFactory: n
    ull
    [java] 09:09:24,061 INFO Configuration:1014 - processing extends queue
    [java] 09:09:24,061 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:09:24,061 INFO HbmBinder:2233 - Mapping collection: Parent.child
    ren -> Child
    [java] 09:09:24,076 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:09:24,076 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:09:24,155 INFO DriverManagerConnectionProvider:41 - Using Hibern
    ate built-in connection pool (not for production use!)
    [java] 09:09:24,170 INFO DriverManagerConnectionProvider:42 - Hibernate co
    nnection pool size: 1
    [java] 09:09:24,170 INFO DriverManagerConnectionProvider:45 - autocommit m
    ode: false
    [java] 09:09:24,170 INFO DriverManagerConnectionProvider:80 - using driver
    : sun.jdbc.odbc.JdbcOdbcDriver at URL: jdbc:odbc:MySQL
    [java] 09:09:24,170 INFO DriverManagerConnectionProvider:86 - connection p
    roperties: {}
    [java] 09:09:24,264 INFO SettingsFactory:77 - RDBMS: Microsoft SQL Server,
    version: 08.00.0194
    [java] 09:09:24,264 INFO SettingsFactory:78 - JDBC driver: JDBC-ODBC Bridg
    e (SQLSRV32.DLL), version: 2.0001 (03.85.1117)
    [java] 09:09:24,296 INFO Dialect:100 - Using dialect: org.hibernate.dialec
    t.SQLServerDialect
    [java] 09:09:24,311 INFO TransactionFactoryFactory:31 - Using default tran
    saction strategy (direct JDBC transactions)
    [java] 09:09:24,327 INFO TransactionManagerLookupFactory:33 - No Transacti
    onManagerLookup configured (in JTA environment, use of read-write or transaction
    al second-level cache is not recommended)
    [java] 09:09:24,327 INFO SettingsFactory:125 - Automatic flush during befo
    reCompletion(): disabled
    [java] 09:09:24,327 INFO SettingsFactory:129 - Automatic session close at
    end of transaction: disabled
    [java] 09:09:24,343 INFO SettingsFactory:144 - Scrollable result sets: ena
    bled
    [java] 09:09:24,343 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): d
    isabled
    [java] 09:09:24,343 INFO SettingsFactory:160 - Connection release mode: au
    to
    [java] 09:09:24,358 INFO SettingsFactory:184 - Maximum outer join fetch de
    pth: 1
    [java] 09:09:24,358 INFO SettingsFactory:187 - Default batch fetch size: 1
    [java] 09:09:24,358 INFO SettingsFactory:191 - Generate SQL with comments:
    disabled
    [java] 09:09:24,358 INFO SettingsFactory:195 - Order SQL updates by primar
    y key: disabled
    [java] 09:09:24,358 INFO SettingsFactory:338 - Query translator: org.hiber
    nate.hql.ast.ASTQueryTranslatorFactory
    [java] 09:09:24,374 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTran
    slatorFactory
    [java] 09:09:24,374 INFO SettingsFactory:203 - Query language substitution
    s: {no='N', yes='Y'}
    [java] 09:09:24,374 INFO SettingsFactory:209 - Second-level cache: enabled
    [java] 09:09:24,374 INFO SettingsFactory:213 - Query cache: disabled
    [java] 09:09:24,374 INFO SettingsFactory:325 - Cache provider: org.hiberna
    te.cache.HashtableCacheProvider
    [java] 09:09:24,374 INFO SettingsFactory:228 - Optimize cache for minimal
    puts: disabled
    [java] 09:09:24,374 INFO SettingsFactory:233 - Cache region prefix: hibern
    ate.test
    [java] 09:09:24,405 INFO SettingsFactory:237 - Structured second-level cac
    he entries: disabled
    [java] 09:09:24,437 INFO SettingsFactory:257 - Echoing all SQL to stdout
    [java] 09:09:24,452 INFO SettingsFactory:264 - Statistics: disabled
    [java] 09:09:24,452 INFO SettingsFactory:268 - Deleted entity synthetic id
    entifier rollback: disabled
    [java] 09:09:24,452 INFO SettingsFactory:283 - Default entity-mode: POJO
    [java] 09:09:24,593 INFO SessionFactoryImpl:155 - building session factory
    [java] 09:09:24,938 INFO SessionFactoryObjectFactory:82 - Not binding fact
    ory to JNDI, no JNDI name configured
    [java] 09:09:24,954 INFO SchemaValidator:99 - Running schema validator
    [java] 09:09:24,954 INFO SchemaValidator:107 - fetching database metadata
    [java] 09:09:24,954 INFO Configuration:1014 - processing extends queue
    [java] 09:09:24,954 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:09:24,954 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:09:24,954 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:09:24,985 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState
    : S1002
    [java] 09:09:24,985 ERROR JDBCExceptionReporter:72 - [Microsoft][ODBC SQL S
    erver Driver]Invalid Descriptor Index
    [java] 09:09:25,001 ERROR SchemaValidator:129 - Error closing connection
    [java] java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid transaction state
    [java] Initial SessionFactory creation failed.org.hibernate.exception.Gener
    icJDBCException: could not get table metadata: Child
    [java] java.lang.ExceptionInInitializerError
    [java] at HibernateUtil.<clinit>(Unknown Source)
    [java] at PCManager.listEvents(Unknown Source)
    [java] at PCManager.main(Unknown Source)
    [java] Caused by: org.hibernate.exception.GenericJDBCException: could not g
    et table metadata: Child
    [java] at org.hibernate.exception.SQLStateConverter.handledNonSpecificE
    xception(SQLStateConverter.java:91)
    [java] at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    [java] at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    [java] at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:2988)
    [java] at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:9
    80)
    [java] at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.jav
    a:739)
    [java] at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaVal
    idator.java:125)
    [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryIm
    pl.java:299)
    [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
    tion.java:1145)
    [java] at HibernateUtil.<clinit>(Unknown Source)
    [java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateCon
    verter.java:79)
    [java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExcep
    tionHelper.java:43)
    [java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExcep
    tionHelper.java:29)
    [java] at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(
    DatabaseMetadata.java:100)
    [java] at org.hibernate.cfg.Configuration.validateSchema(Configuration.
    java:946)
    [java] at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaVal
    idator.java:116)
    [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryIm
    pl.java:299)
    [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
    tion.java:1145)
    [java] ... 3 more
    [java] Caused by: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver
    ]Invalid Descriptor Index
    [java] at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    [java] at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    [java] at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3862)
    [java] at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultS
    et.java:5561)
    [java] at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.j
    ava:338)
    [java] at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.j
    ava:395)
    [java] at PCManager.listEvents(Unknown Source)
    [java] at PCManager.main(Unknown Source)
    [java] at org.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata
    .java:30)
    [java] at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(
    DatabaseMetadata.java:85)
    [java] ... 7 more
    [java] Exception in thread "main"
    [java] Java Result: 1
    BUILD SUCCESSFUL
    Total time: 4 seconds
    Name and version of the database you are using:
    Microsoft SQLServer2000
    The generated SQL (show_sql=true):
    When the program is run with "hbm2ddl.auto" property as create, I get the following output.
    C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc2\MyHibernate>ant run -Daction=store
    Buildfile: build.xml
    clean:
    [delete] Deleting directory C:\Documents and Settings\mirza\Desktop\hibernate
    -3.1rc2\MyHibernate\bin
    [mkdir] Created dir: C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc
    2\MyHibernate\bin
    copy-resources:
    [copy] Copying 4 files to C:\Documents and Settings\mirza\Desktop\hibernate
    -3.1rc2\MyHibernate\bin
    compile:
    [javac] Compiling 5 source files to C:\Documents and Settings\mirza\Desktop\
    hibernate-3.1rc2\MyHibernate\bin
    run:
    [java] 09:12:54,820 INFO Environment:474 - Hibernate 3.1 rc2
    [java] 09:12:54,836 INFO Environment:489 - loaded properties from resource
    hibernate.properties: {hibernate.cglib.use_reflection_optimizer=true, hibernate
    .cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dial
    ect=org.hibernate.dialect.SQLServerDialect, hibernate.max_fetch_depth=1, hiberna
    te.jdbc.use_streams_for_binary=true, hibernate.format_sql=true, hibernate.query.
    substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.cac
    he.region_prefix=hibernate.test, hibernate.jdbc.batch_versioned_data=true, hiber
    nate.connection.pool_size=1}
    [java] 09:12:54,852 INFO Environment:519 - using java.io streams to persis
    t binary types
    [java] 09:12:54,852 INFO Environment:520 - using CGLIB reflection optimize
    r
    [java] 09:12:54,867 INFO Environment:550 - using JDK 1.4 java.sql.Timestam
    p handling
    [java] 09:12:54,946 INFO Configuration:1257 - configuring from resource: /
    hibernate.cfg.xml
    [java] 09:12:54,946 INFO Configuration:1234 - Configuration resource: /hib
    ernate.cfg.xml
    [java] 09:12:55,259 INFO Configuration:460 - Reading mappings from resourc
    e: PCMapping.hbm.xml
    [java] 09:12:55,400 INFO HbmBinder:266 - Mapping class: Parent -> Parent
    [java] 09:12:55,447 INFO HbmBinder:266 - Mapping class: Child -> Child
    [java] 09:12:55,447 INFO Configuration:1368 - Configured SessionFactory: n
    ull
    [java] 09:12:55,447 INFO Configuration:1014 - processing extends queue
    [java] 09:12:55,447 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:12:55,447 INFO HbmBinder:2233 - Mapping collection: Parent.child
    ren -> Child
    [java] 09:12:55,463 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:12:55,479 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:12:55,557 INFO DriverManagerConnectionProvider:41 - Using Hibern
    ate built-in connection pool (not for production use!)
    [java] 09:12:55,557 INFO DriverManagerConnectionProvider:42 - Hibernate co
    nnection pool size: 1
    [java] 09:12:55,557 INFO DriverManagerConnectionProvider:45 - autocommit m
    ode: false
    [java] 09:12:55,573 INFO DriverManagerConnectionProvider:80 - using driver
    : sun.jdbc.odbc.JdbcOdbcDriver at URL: jdbc:odbc:MySQL
    [java] 09:12:55,573 INFO DriverManagerConnectionProvider:86 - connection p
    roperties: {}
    [java] 09:12:55,651 INFO SettingsFactory:77 - RDBMS: Microsoft SQL Server,
    version: 08.00.0194
    [java] 09:12:55,667 INFO SettingsFactory:78 - JDBC driver: JDBC-ODBC Bridg
    e (SQLSRV32.DLL), version: 2.0001 (03.85.1117)
    [java] 09:12:55,682 INFO Dialect:100 - Using dialect: org.hibernate.dialec
    t.SQLServerDialect
    [java] 09:12:55,698 INFO TransactionFactoryFactory:31 - Using default tran
    saction strategy (direct JDBC transactions)
    [java] 09:12:55,714 INFO TransactionManagerLookupFactory:33 - No Transacti
    onManagerLookup configured (in JTA environment, use of read-write or transaction
    al second-level cache is not recommended)
    [java] 09:12:55,714 INFO SettingsFactory:125 - Automatic flush during befo
    reCompletion(): disabled
    [java] 09:12:55,714 INFO SettingsFactory:129 - Automatic session close at
    end of transaction: disabled
    [java] 09:12:55,729 INFO SettingsFactory:144 - Scrollable result sets: ena
    bled
    [java] 09:12:55,729 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): d
    isabled
    [java] 09:12:55,745 INFO SettingsFactory:160 - Connection release mode: au
    to
    [java] 09:12:55,745 INFO SettingsFactory:184 - Maximum outer join fetch de
    pth: 1
    [java] 09:12:55,745 INFO SettingsFactory:187 - Default batch fetch size: 1
    [java] 09:12:55,745 INFO SettingsFactory:191 - Generate SQL with comments:
    disabled
    [java] 09:12:55,745 INFO SettingsFactory:195 - Order SQL updates by primar
    y key: disabled
    [java] 09:12:55,745 INFO SettingsFactory:338 - Query translator: org.hiber
    nate.hql.ast.ASTQueryTranslatorFactory
    [java] 09:12:55,777 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTran
    slatorFactory
    [java] 09:12:55,792 INFO SettingsFactory:203 - Query language substitution
    s: {no='N', yes='Y'}
    [java] 09:12:55,792 INFO SettingsFactory:209 - Second-level cache: enabled
    [java] 09:12:55,792 INFO SettingsFactory:213 - Query cache: disabled
    [java] 09:12:55,792 INFO SettingsFactory:325 - Cache provider: org.hiberna
    te.cache.HashtableCacheProvider
    [java] 09:12:55,808 INFO SettingsFactory:228 - Optimize cache for minimal
    puts: disabled
    [java] 09:12:55,808 INFO SettingsFactory:233 - Cache region prefix: hibern
    ate.test
    [java] 09:12:55,808 INFO SettingsFactory:237 - Structured second-level cac
    he entries: disabled
    [java] 09:12:55,839 INFO SettingsFactory:257 - Echoing all SQL to stdout
    [java] 09:12:55,839 INFO SettingsFactory:264 - Statistics: disabled
    [java] 09:12:55,839 INFO SettingsFactory:268 - Deleted entity synthetic id
    entifier rollback: disabled
    [java] 09:12:55,839 INFO SettingsFactory:283 - Default entity-mode: POJO
    [java] 09:12:55,980 INFO SessionFactoryImpl:155 - building session factory
    [java] 09:12:56,325 INFO SessionFactoryObjectFactory:82 - Not binding fact
    ory to JNDI, no JNDI name configured
    [java] 09:12:56,341 INFO Configuration:1014 - processing extends queue
    [java] 09:12:56,341 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:12:56,341 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:12:56,341 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:12:56,356 INFO Configuration:1014 - processing extends queue
    [java] 09:12:56,356 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:12:56,356 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:12:56,372 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:12:56,372 INFO SchemaExport:153 - Running hbm2ddl schema export
    [java] 09:12:56,388 DEBUG SchemaExport:171 - import file not found: /import
    .sql
    [java] 09:12:56,388 INFO SchemaExport:180 - exporting generated schema to
    database
    [java] 09:12:56,403 DEBUG SchemaExport:283 -
    [java] alter table Child
    [java] drop constraint FK3E104FC976A59A
    [java] 09:12:56,466 DEBUG SchemaExport:283 -
    [java] drop table Child
    [java] 09:12:56,544 DEBUG SchemaExport:283 -
    [java] drop table Parent
    [java] 09:12:56,654 DEBUG SchemaExport:283 -
    [java] create table Child (
    [java] id numeric(19,0) identity not null,
    [java] name varchar(255) null,
    [java] parent_id numeric(19,0) null,
    [java] primary key (id)
    [java] )
    [java] 09:12:56,779 DEBUG SchemaExport:283 -
    [java] create table Parent (
    [java] id numeric(19,0) identity not null,
    [java] primary key (id)
    [java] )
    [java] 09:12:56,873 DEBUG SchemaExport:283 -
    [java] alter table Child
    [java] add constraint FK3E104FC976A59A
    [java] foreign key (parent_id)
    [java] references Parent
    [java] 09:12:56,952 INFO SchemaExport:200 - schema export complete
    [java] 09:12:56,952 WARN JDBCExceptionReporter:48 - SQL Warning: 5701, SQL
    State: 01000
    [java] 09:12:56,952 WARN JDBCExceptionReporter:49 - [Microsoft][ODBC SQL S
    erver Driver][SQL Server]Changed database context to 'master'.
    [java] 09:12:56,952 WARN JDBCExceptionReporter:48 - SQL Warning: 5703, SQL
    State: 01000
    [java] 09:12:56,952 WARN JDBCExceptionReporter:49 - [Microsoft][ODBC SQL S
    erver Driver][SQL Server]Changed language setting to us_english.
    [java] 09:12:56,983 INFO SessionFactoryImpl:432 - Checking 0 named queries
    [java] Hibernate:
    [java] insert
    [java] into
    [java] Child
    [java] (name)
    [java] values
    [java] (?) select
    [java] scope_identity()
    [java] Hibernate:
    [java] insert
    [java] into
    [java] Child
    [java] (name)
    [java] values
    [java] (?) select
    [java] scope_identity()
    [java] Hibernate:
    [java] insert
    [java] into
    [java] Child
    [java] (name)
    [java] values
    [java] (?) select
    [java] scope_identity()
    [java] Hibernate:
    [java] insert
    [java] into
    [java] Parent
    [java] default
    [java] values
    [java] select
    [java] scope_identity()
    [java] Hibernate:
    [java] update
    [java] Child
    [java] set
    [java] parent_id=?
    [java] where
    [java] id=?
    [java] Hibernate:
    [java] update
    [java] Child
    [java] set
    [java] parent_id=?
    [java] where
    [java] id=?
    [java] Hibernate:
    [java] update
    [java] Child
    [java] set
    [java] parent_id=?
    [java] where
    [java] id=?
    [java] 09:12:57,390 INFO SessionFactoryImpl:831 - closing
    [java] 09:12:57,390 INFO DriverManagerConnectionProvider:147 - cleaning up
    connection pool: jdbc:odbc:MySQL
    BUILD SUCCESSFUL
    Total time: 5 seconds
    Debug level Hibernate log excerpt:
    Included in the above description.

    That's not the right mapping for the 1:m relationship in Hibernate.
    First of all, I believe the recommendation is to have a separate .hbm.xml file for each class, so you should have one for Parent and Child.
    Second, you'll find the proper syntax for a one-to-many relationship here:
    http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html#tutorial-associations
    See if those help.
    The tutorial docs for Hibernate are quite good. I'd recommend going through them carefully.
    %

  • How to read, write and save a file?

    Hello everybody,
    I have a question about reading , writing and save something into a file (etc text file)
    For example: I want to create a file of football in which there are many key words as: "football", "touch down", "quarterback", "ball", "linebacker", "coach", "player"...
    Now i want to open to read, write one more word "head" ( synonym with "coach") and store it for using next time. How could i do that?
    Could anybody help me about that?
    Thank you very much in advance.
    still_learn

    take a look in the API about FileInputStream and FileOutputStream

  • How many addresses can i send an e mail to in one go? is there a limit?

    I am trying to send a mail to all my contacts in one go. is there a limit on how many addresses can be entered into the to/cc or bcc lines in one go?

    Every mail service provider imposes such limits. The limits for iCloud are given here:
    iCloud: Mail specifications
    For legitimate bulk mailing, you should use a hosted service such as "MailChimp."

  • Error 33172 occurred at Read & Write data transfer between two or more PF2010 controller

    Hi,i need to do data transfer between two or more FP2010 controller.e.g. FP2010(A) & FP2010(B).
    FP2010(A) need to transfer the measurement (from its I/O module) to FP2010(B) to do the data analysis.These data transfer should be synchronous btw two controller to prevent data lost.
    From the vi used in the attachment,i encountered some problems at:
    (1) Error 33172 occurred while publishing the data.Can i create and publish data under different item name?
    (2) How to synchronies the read & write btw contorller?
    All controller are communicating with each other directly without the need of a host computer to link them together
    Is there any other method to do fast data transfer betwe
    en controller?

    Hi YongNei,
    You were succesful in omiting enough information to make it very difficult to answer!
    Please post your example.
    Please tell us what version of LV-RT you are using.
    Please define what you concider "fast data transfer".
    Have you concidered mapping the FP tags of FP2010(A) to FP2010(B) and vise versa?
    WHat exactly has to be syncronized?
    If you have something that is close to working, share that.
    Well, that as far as I can go with the info you have provided. Depending on the details, what you are asking could be anything from trivial to impossible with the currently available technology. I just can't say.
    It would probably be a good idea to start over with a fresh question (sorry) because not many people are going to know what a a "
    PF2010" is and I can not guarentee that I will be able to get back to you personally until next week-end.
    Trying to help you get an answer,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Not allowed to move (only copy) files within Shared Folder (yes, permissions are set to Read/Write)

    I have moved my media (Music, Movies, Pictures) to the Users/Shared folder.  As I'm doing some cleanup in these folders, I am trying to move several folders/files at once, all within the same Shared folder.  I have confirmed that the permissions settings under "Get Info" are set to "Read/Write" and I have verified and repaired permissions with Disk Utility.  However, every move I try to do is a copy.  I have tried the Command-Drag method, but I'm still left with the green plus sign indicating a copy.
    On smaller files/folders, this wouldn't matter so much as I would copy, then just delete the original.  But I'm dealing with many, many gigs of music and my HD doesn't have space for holding copies, even if the originals will be deleted.
    Very frustrating to have to spend so much time to figure out what would seem to be a very basic file management feature.
    I've searched and read and searched some more, but I'm stuck.  Thanks to any who can help. 

    Do have file sharing and remote login checked
    When on Betty's computer, Sign into Bob's computer with Bob's username & Bob's Password, instead of Betty's.
    BINGO!!!!  Problem solved.  Many thanks!!!

Maybe you are looking for