此 SqlParameterCollection 的 Count=8 的索引 8 无效。 10
1。在插入Blacklist对象的时候报错。2。我尝试着删除<many-to-one...>的两端配置节之后添加成功,但是在查询出来的Blacklist对象中的关联的父对...
1。在插入Blacklist对象的时候报错。
2。我尝试着删除<many-to-one ...>的两端配置节之后添加成功,但是在查询出来的Blacklist对象中的关联的父对象都为空。
3。以下是Blacklist映射的配置表。这个问题困扰我好久,希望有人帮我解决一下,谢谢!
1 <?xml version='1.0' encoding='utf-8' ?>
2 <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2'
3 assembly='Model'
4 namespace='Model'
5 >
6 <class name='Blacklist'
7 table='`Blacklist`'
8 >
9 <id name='Id'
10 column='`Id`'
11 >
12 <generator class='native'>
13 </generator>
14 </id>
15 <property name='Number'
16 column='`Number`'
17 />
18 <property name='SearchCount'
19 column='`SearchCount`'
20 />
21 <property name='ReportCount'
22 column='`ReportCount`'
23 />
24 <property name='AccusedCityId'
25 column='`AccusedCityId`'
26 />
27 <property name='AssuedIp'
28 column='`AssuedIp`'
29 />
30 <property name='AssuedName'
31 column='`AssuedName`'
32 />
33 <property name='UserId'
34 column='`UserId`'
35 />
36 <property name='ReportTime'
37 column='ReportTime'
38 />
39 <bag name='BlacklistRelationFastGroups' cascade='all' inverse='false'>
40 <key column='`BlacklistId`' />
41 <one-to-many class='BlacklistRelationFastGroup' />
42 </bag>
43
44 <bag name='BlacklistRelationFeatures' cascade='all' inverse='false'>
45 <key column='`BlacklistId`' />
46 <one-to-many class='BlacklistRelationFeature' />
47 </bag>
48
49 <bag name='Indicatives' cascade='all' inverse='false'>
50 <key column='`BlackId`' />
51 <one-to-many class='Indicative'/>
52
53 </bag>
54 <many-to-one name='User' class='Users' column='`UserId`' />
55 <many-to-one name='AccusedCity' class='Region' column='`AccusedCityId`'/>
56 </class>
57 </hibernate-mapping> 展开
2。我尝试着删除<many-to-one ...>的两端配置节之后添加成功,但是在查询出来的Blacklist对象中的关联的父对象都为空。
3。以下是Blacklist映射的配置表。这个问题困扰我好久,希望有人帮我解决一下,谢谢!
1 <?xml version='1.0' encoding='utf-8' ?>
2 <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2'
3 assembly='Model'
4 namespace='Model'
5 >
6 <class name='Blacklist'
7 table='`Blacklist`'
8 >
9 <id name='Id'
10 column='`Id`'
11 >
12 <generator class='native'>
13 </generator>
14 </id>
15 <property name='Number'
16 column='`Number`'
17 />
18 <property name='SearchCount'
19 column='`SearchCount`'
20 />
21 <property name='ReportCount'
22 column='`ReportCount`'
23 />
24 <property name='AccusedCityId'
25 column='`AccusedCityId`'
26 />
27 <property name='AssuedIp'
28 column='`AssuedIp`'
29 />
30 <property name='AssuedName'
31 column='`AssuedName`'
32 />
33 <property name='UserId'
34 column='`UserId`'
35 />
36 <property name='ReportTime'
37 column='ReportTime'
38 />
39 <bag name='BlacklistRelationFastGroups' cascade='all' inverse='false'>
40 <key column='`BlacklistId`' />
41 <one-to-many class='BlacklistRelationFastGroup' />
42 </bag>
43
44 <bag name='BlacklistRelationFeatures' cascade='all' inverse='false'>
45 <key column='`BlacklistId`' />
46 <one-to-many class='BlacklistRelationFeature' />
47 </bag>
48
49 <bag name='Indicatives' cascade='all' inverse='false'>
50 <key column='`BlackId`' />
51 <one-to-many class='Indicative'/>
52
53 </bag>
54 <many-to-one name='User' class='Users' column='`UserId`' />
55 <many-to-one name='AccusedCity' class='Region' column='`AccusedCityId`'/>
56 </class>
57 </hibernate-mapping> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询