Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
titleBasic spatial mapping setup
linenumberstrue
<mapper:mapper id="mapper.arcsde">
	<spatialEngine>spatialengine.arcsde</spatialEngine>
	<mapping>
		<entity>property</entity>
		<table>PROPERTY</table>
		<key>PID</key>
	</mapping>
	<mapping>
		<entity>roads</entity>
		<key>RD_NAME</key>
		<mapping>
			<table>MAJOR_ROADS</table>
		</mapping>
		<mapping>
			<table>MINOR_ROADS</table>
		</mapping>
	</mapping>
	<mapping>
		<entity>suburbs</entity>
		<table>SUBURBS</table>
		<key>LOC_NAME</key>
	</mapping>
	<mapping>
		<entity>council_buildings</entity>
		<table>BUILDINGS</table>
	</mapping>
</mapping>
<mapper:mapper id="mapper.oracle">
	<spatialEngine>spatialengine.oracle</spatialEngine>
	<mapping>
		<entity>drainage</entity>
		<table>DRAINAGE</table>
	</mapping>
</mapper:mapper>


If the data in the underlying spatial engine can change over time then the dynamic and cache flags should be set to disable caching and enable dynamic lookup of the id's. This is especially relevant if the id's change when records are added or deleted for example so should always be performed when the entity is editable.

Code Block
xml
xml
titleSpatial mapping for dynamic data
linenumberstrue
<mapper:mapper id="mapper.edit">
	<spatialEngine>spatialengine.arcsde</spatialEngine>
	<mapping>
		<entity>grafitti</entity>
		<table>GRAFITTI</table>
		<key>PID</key>
		<dynamic>true</dynamic>
		<dynamic<cache>false</>cache>
	</mapping>
</mapper:mapper>

...