alfred jones wrote:
Tim McGuire wrote:I just realized the documentation I linked to is for OC4J, which has a subset of the annotations. In other words, forget that link
If you are like me and have an object in your database called a "sequence", then you want something like this:
You have ...
generator = "hch_sequence"
name = "hch_sequence"
sequenceName = "hch_sequence"
Do I need keep all similar names ? if not which names could be different ?
However, I dont have "sequence". MySQL does not support sequence. I have put id field as auto increment in MySQL database. Is it not possible using JPA in MySQL ?
Tim McGuire wrote:I just realized the documentation I linked to is for OC4J, which has a subset of the annotations. In other words, forget that link
If you are like me and have an object in your database called a "sequence", then you want something like this:
Tim McGuire wrote:
alfred jones wrote:Thanks.
I will have a database autoincrement id. Do i need to keep an id field in entity class?
Yes, if you read the documentation I linked to, you will see that there are extra annotations for letting EJB know that the database will generate autoincrement id.
Prabhakar Reddy Bokka wrote:Yes. It is database table name.
Mohamed Sanaulla wrote:I think the diagram explaining Aggregation should be using listOfClasses instead of listOfStudents.
A neatly explained Aggregation diagram here.
Definition for Whole-part relationship.
Ran Pleasant wrote:To indicate that the Class object cannot exit without the Professor object then the diamond head of the aggregation would need to be filled in, usually with black.
This is called Composition and again similar to aggregation|association.
Ran Pleasant wrote:Alfred
The diamond head of the aggregation symbol is clear. That means a Professor object will aggregate zero or more Class objects but that the Class objects can exist without the Professor. To indicate that the Class object cannot exit without the Professor object then the diamond head of the aggregation would need to be filled in, usually with black. The diagram you posted makes sense because a college class is often scheduled before a professor is assigned to teach the class.