---
title: "無主鍵表 Attribute   \"xxx \"   must   be   declared   for   element   type   \"xxx\""
author: "zps_77"
date: "2012-08-28T16:22:28Z"
tags: []
categories: ["编程语言"]
slug: "attribute-xxx-must-be-declared-for-element-type-xxx"
draft: false
lastmod: "2012-08-28T16:23:10Z"
id: 1665422
url: "https://geven7.iteye.com/blog/1665422"
---

```
	<class name="xxx" table="xxx">
		<composite-id>
			<key-property name="xx">
				<column name="xx" sql-type="decimal" precision="4" scale="2" not-null="true"></column>
			</key-property>
		</composite-id>
	</class>
```

 

```
	<class name="xxx" table="xxx">
		<composite-id>
			<key-property name="xxx">
				<column name="xxx" sql-type="nvarchar(300)"></column>
			</key-property>
		</composite-id>
	</class>
```