Changeset 945
- Timestamp:
- 05/17/06 07:11:19
- Files:
-
- DB/DBModelEntity.lua (modified) (1 diff)
- DB/TestModel.lua (modified) (3 diffs)
- DB/TestQuery.lua (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
DB/DBModelEntity.lua
r885 r945 158 158 159 159 function self:addToRelations( aValue ) 160 if aValue ~= ni then160 if aValue ~= nil then 161 161 if aValue:entity() == self then 162 162 local aName = aValue:name() DB/TestModel.lua
r886 r945 16 16 -- local aRow = LUMap( { id = 12345, name = "Tokyo", countryId = "JP" } ) 17 17 18 --[[19 18 DBModel:load( function() 20 19 Is( Author ) … … 38 37 HasMany( books ) 39 38 end ) 40 ]]--41 39 42 40 --[[ … … 87 85 ]]-- 88 86 87 --[[ 89 88 DBModel:load( function() 90 89 Is( Node ) 90 HasOne( next, Node ) 91 HasOne( previous, Node ) 91 92 HasOne( parent, Node ) 92 93 HasMany( children, Node, Join( id, parentId ) ) 93 94 end ) 95 ]]-- 94 96 95 97 for _, anEntity in DBModel:entities():values():sort():iterator() do DB/TestQuery.lua
r872 r945 107 107 108 108 local aStatement = function() 109 Delete( people ) :className()109 Delete( people ) 110 110 Where( Eq( name, aName ) ) 111 111 end