Versions Compared

Key

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

...

Warning

Previously a single spatial mapper could be used with multiple spatial engines, by setting the spatial engine attribute for each mapping, but that is not no longer possible.

If you have multiple spatial engines you need to have multiple spatial mappers configured, one for each spatial engine.

Setting the spatial engine at the mapping level is no longer supported, it must be set once at the top level for the spatial mapper.

...

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/><dynamic>true</dynamic>
		<cache>false</cache>
	</mapping>
</mapper:mapper>

...