English 中文(简体)
1. 模仿与属性的关系
原标题:Modelling a manyToMany relationship with attributes
  • 时间:2010-05-31 11:38:04
  •  标签:
  • java
  • jpa

我在两班之间有着许多ToMany关系,例如,客户和类别项目。 客户可以购买几个物品,一个物品可以由不同的客户购买。 我需要储存这方面的额外信息,例如购买该物品的当天。 我想知道,这通常如何仿照《人民军法》,使我无法确定如何在法典中表述这一点。 我是否必须设立一个新班,以模仿关系的所有特征,使其他班级之间形成许多“图曼”关系,还是这样做的更好方式?

增 编

最佳回答

所建议的方式是设立一个新的协会,以储存所需的属性,并向双方设立两个单人协会。

问题回答

我猜测,你确实需要为关系建立一个新的阶层。

和你一样,正确的办法是建立一个具有额外特性的新类别。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签