With the ColdFusion 9.0.1 update, you can now use multiple data sources with ORM. When you create your objects, use the "datasource" attribute to specify which each should use. Below is an example of it in use:
ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org
component persistent = true
accessors = true
entityname = 'Contact'
hint = 'This object holds contacts and their associated properties'
datasource = 'mydatasource' {
property name='ContactID' type='numeric' persistent=true ormtype='integer' fieldtype='id' generator='increment';
}
1component persistent = true
2 accessors = true
3 entityname = 'Contact'
4 hint = 'This object holds contacts and their associated properties'
5 datasource = 'mydatasource' {
6
7property name='ContactID' type='numeric' persistent=true ormtype='integer' fieldtype='id' generator='increment';
8}
If you don't specify a data source, the default data source is used.
Comments
There are no comments for this entry.
[Add Comment] [Subscribe to Comments]