Creation of Records Not attached to a DataSet

Anthony Berglas <[email protected]>
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
I have added this facility, mainly to help with porting applications 
from 2.*.  SDataSet.createDetachedInstance creates an instance that 
can be myDs.attach later.

I do not recommend this as a general approach.



         // The following usage is DEPRECATED
         Employee e1300 = SDataSet.createDetachedInstance(Employee.EMPLOYEE);

         e1300.setString(e1300.EMPEE_ID, "1300");
         e1300.setString(e1300.NAME, "Created Detached");
         TestUte.assertEqual(e1300.getString(e1300.NAME), "Created Detached");
         e1300.setString(e1300.MANAGER_EMPEE_ID, "1200");
         TestUte.assertEqual(e1300.getString(e1300.MANAGER_EMPEE_ID), "1200");

         myDs.attach(e1300);

         TestUte.assertEqual(e1300.findReference(e1300.MANAGER), e1200);


Dr Anthony Berglas, [email protected]       Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that is the best way to collect firewood.


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.