About Question enthuware.oce-jpad.v6.2.591 :
Moderator: admin
-
- Posts: 4
- Joined: Tue Oct 15, 2013 11:12 am
- Contact:
About Question enthuware.oce-jpad.v6.2.591 :
what is the hint from the question that 'ActivityDetails' is a singular Attribute
-
- Site Admin
- Posts: 10078
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.591 :
The problem statement specifies that details field is of type ActivityDetail and not a collection of ActivityDetail. That means it is singular.
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.591 :
But Activity class is an entity according to the question statement "Activity class contains two persistence fields..."
I think it should be
If we use @ElementCollection, Activity should be an embeddable class.
Correct me if I am wrong.
I think it should be
Code: Select all
@OneToMany
Set<Activity> recentActivities
Correct me if I am wrong.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.591 :
Let me answer my own question.
I guess Activity may be an embeddable, not an entity:
I guess Activity may be an embeddable, not an entity:
Code: Select all
@Embeddable
public class Activity{
//This relationship is for Customer to ActivityDetail;
@ManyToOne
ActivityDetail details;
//An embedable class inside Activity.
@Embedded
Note note;
}
Who is online
Users browsing this forum: No registered users and 9 guests