home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / Database / OTC_EOFBetaExamples_V1.0 / EOFramework / KeyValueCoding / catalog.eomodel < prev    next >
Encoding:
Text File  |  1994-06-16  |  3.8 KB  |  167 lines

  1. {
  2.     Class = EOModel; 
  3.     EOModelVersion = 1; 
  4.     adaptorName = Sybase; 
  5.     connectionDictionary = {databaseName = pubs; hostName = SYBASE; password = ""; userName = sa; }; 
  6.     entities = (
  7.     {
  8.             Class = EOEntity; 
  9.         attributes = (
  10.         {
  11.                     Class = EOAttribute; 
  12.             columnName = au_id; 
  13.             externalType = id; 
  14.             isReadOnly = N; 
  15.             name = au_id; 
  16.             valueClassName = NSString; 
  17.         }, 
  18.         {
  19.                     Class = EOAttribute; 
  20.             columnName = au_fname; 
  21.             externalType = varchar; 
  22.             isReadOnly = N; 
  23.             name = firstname; 
  24.             valueClassName = NSString; 
  25.         }, 
  26.         {
  27.                     Class = EOAttribute; 
  28.             definition = "firstname + ' ' + lastname"; 
  29.             externalType = varchar; 
  30.             isReadOnly = Y; 
  31.             name = fullname; 
  32.             valueClassName = NSString; 
  33.         }, 
  34.         {
  35.                     Class = EOAttribute; 
  36.             columnName = au_lname; 
  37.             externalType = varchar; 
  38.             isReadOnly = N; 
  39.             name = lastname; 
  40.             valueClassName = NSString; 
  41.         }, 
  42.         {
  43.                     Class = EOAttribute; 
  44.             definition = toTitleAuthor.toTitles.price; 
  45.             externalType = money; 
  46.             isReadOnly = Y; 
  47.             name = price; 
  48.             valueClassName = NSNumber; 
  49.             valueType = d; 
  50.         }, 
  51.         {
  52.                     Class = EOAttribute; 
  53.             definition = toTitleAuthor.toTitles.title; 
  54.             externalType = varchar; 
  55.             isReadOnly = Y; 
  56.             name = title; 
  57.             valueClassName = NSString; 
  58.         }
  59.         ); 
  60.         attributesUsedForLocking = (au_id, firstname, lastname); 
  61.         className = Catalog; 
  62.         classProperties = (toTitleAuthor, au_id, price, title, firstname, lastname, fullname); 
  63.         externalName = authors; 
  64.         externalQuery = Catalog; 
  65.         isReadOnly = N; 
  66.         name = authors; 
  67.         primaryKeyAttributes = (firstname); 
  68.         relationships = (
  69.         {
  70.                     Class = EORelationship; 
  71.             destination = titleauthor; 
  72.             isToMany = N; 
  73.             joins = (
  74.             {
  75.                             Class = EOJoin; 
  76.                 destinationAttribute = au_id; 
  77.                 joinOperator = EOJoinEqualTo; 
  78.                 joinSemantic = EOInnerJoin; 
  79.                 sourceAttribute = au_id; 
  80.             }
  81.             ); 
  82.             name = toTitleAuthor; 
  83.         }
  84.         ); 
  85.     }, 
  86.     {
  87.             Class = EOEntity; 
  88.         attributes = (
  89.         {
  90.                     Class = EOAttribute; 
  91.             columnName = au_id; 
  92.             externalType = id; 
  93.             isReadOnly = N; 
  94.             name = au_id; 
  95.             valueClassName = NSString; 
  96.         }, 
  97.         {
  98.                     Class = EOAttribute; 
  99.             columnName = title_id; 
  100.             externalType = tid; 
  101.             isReadOnly = N; 
  102.             name = title_id; 
  103.             valueClassName = NSString; 
  104.         }
  105.         ); 
  106.         attributesUsedForLocking = (au_id, title_id); 
  107.         classProperties = (au_id, title_id, toTitles); 
  108.         externalName = titleauthor; 
  109.         isReadOnly = N; 
  110.         name = titleauthor; 
  111.         primaryKeyAttributes = (au_id); 
  112.         relationships = (
  113.         {
  114.                     Class = EORelationship; 
  115.             destination = titles; 
  116.             isToMany = N; 
  117.             joins = (
  118.             {
  119.                             Class = EOJoin; 
  120.                 destinationAttribute = title_id; 
  121.                 joinOperator = EOJoinEqualTo; 
  122.                 joinSemantic = EOInnerJoin; 
  123.                 sourceAttribute = title_id; 
  124.             }
  125.             ); 
  126.             name = toTitles; 
  127.         }
  128.         ); 
  129.     }, 
  130.     {
  131.             Class = EOEntity; 
  132.         attributes = (
  133.         {
  134.                     Class = EOAttribute; 
  135.             columnName = price; 
  136.             externalType = money; 
  137.             isReadOnly = N; 
  138.             name = price; 
  139.             valueClassName = NSNumber; 
  140.             valueType = d; 
  141.         }, 
  142.         {
  143.                     Class = EOAttribute; 
  144.             columnName = title; 
  145.             externalType = varchar; 
  146.             isReadOnly = N; 
  147.             name = title; 
  148.             valueClassName = NSString; 
  149.         }, 
  150.         {
  151.                     Class = EOAttribute; 
  152.             columnName = title_id; 
  153.             externalType = tid; 
  154.             isReadOnly = N; 
  155.             name = title_id; 
  156.             valueClassName = NSString; 
  157.         }
  158.         ); 
  159.         attributesUsedForLocking = (price, title, title_id); 
  160.         classProperties = (price, title, title_id); 
  161.         externalName = titles; 
  162.         isReadOnly = N; 
  163.         name = titles; 
  164.         primaryKeyAttributes = (title); 
  165.     }
  166.     ); 
  167. }