我在两班之间有着许多ToMany关系,例如,客户和类别项目。 客户可以购买几个物品,一个物品可以由不同的客户购买。 我需要储存这方面的额外信息,例如购买该物品的当天。 我想知道,这通常如何仿照《人民军法》,使我无法确定如何在法典中表述这一点。 我是否必须设立一个新班,以模仿关系的所有特征,使其他班级之间形成许多“图曼”关系,还是这样做的更好方式?
增 编
我在两班之间有着许多ToMany关系,例如,客户和类别项目。 客户可以购买几个物品,一个物品可以由不同的客户购买。 我需要储存这方面的额外信息,例如购买该物品的当天。 我想知道,这通常如何仿照《人民军法》,使我无法确定如何在法典中表述这一点。 我是否必须设立一个新班,以模仿关系的所有特征,使其他班级之间形成许多“图曼”关系,还是这样做的更好方式?
增 编
所建议的方式是设立一个新的协会,以储存所需的属性,并向双方设立两个单人协会。
我猜测,你确实需要为关系建立一个新的阶层。
和你一样,正确的办法是建立一个具有额外特性的新类别。
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 ...
Check this, List<String> list = new ArrayList<String>(); for (int i = 0; i < 10000; i++) { String value = (""+UUID.randomUUID().getLeastSignificantBits()).substring(3, ...
I am in the middle of solving a problem where I think it s best suited for a decorator and a state pattern. The high level setting is something like a sandwich maker and dispenser, where I have a set ...
I have been trying to execute a MS SQL Server stored procedure via JDBC today and have been unsuccessful thus far. The stored procedure has 1 input and 1 output parameter. With every combination I ...
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 ...
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 ...
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....
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 ...