1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.ActiveRecord
.Tests
.Model
.GenericModel
18 using System
.Collections
;
22 using Castle
.ActiveRecord
;
23 using Castle
.ActiveRecord
.Framework
;
25 [ActiveRecord("genericentity"), JoinedBase
]
26 public abstract class Entity
<T
> : ActiveRecordBase
<T
> where T
: class
59 [ActiveRecord("genericentitycompany")]
60 public class CompanyEntity
: Entity
<CompanyEntity
>
62 private byte company_type
;
65 [JoinedKey("comp_id")]
68 get { return comp_id; }
69 set { comp_id = value; }
72 [Property("company_type")]
73 public byte CompanyType
75 get { return company_type; }
76 set { company_type = value; }
81 [ActiveRecord("genericentityperson")]
82 public class PersonEntity
: Entity
<PersonEntity
>
84 private int person_id
;
89 get { return person_id; }
90 set { person_id = value; }