The alternative:
@AttributeOverride( name="value.embeddableValue1", column=@Column(name="EV_1") )
Not require to be inner a @AttributeOverrides annotation?
			
			
									
									
						About Question enthuware.oce-jpad.v6.2.415 :
Moderators: Site Manager, fjwalraven
- 
				evefuji
- Posts: 21
- Joined: Fri Apr 11, 2014 8:57 pm
- Contact:
- 
				admin
- Site Admin
- Posts: 10441
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.415 :
No, @AttributeOverrides is required when you are trying to specify multiple @AttributeOverride. This option has only one, so @AttributeOverrides is not necessary.
			
			
									
									
						- 
				sztgeza
- Posts: 4
- Joined: Thu Sep 04, 2014 2:32 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.415 :
One of the correct options is:
However, it seems that it's wrong - the second @AttributeOverride contains "key.keyField1" (with capital 'F'), but in 
you can see, there is keyfield1, with lowercase 'f'. 
Therefore (, at least using Eclipselink schemagenerator) an exception will be thrown:
			
			
									
									
						Code: Select all
@AttributeOverrides(     {     @AttributeOverride( name="value.embeddableValue1",   column=@Column(name="EV_1") ),     @AttributeOverride( name="value.embeddableValue2",   column=@Column(name="EV_2") ),     @AttributeOverride( name="key.keyField1", column=@Column(name="KF_1") )   } )
Code: Select all
public class EmbeddableKey implements Serializable {     private String keyfield1;
Therefore (, at least using Eclipselink schemagenerator) an exception will be thrown:
As far as I know, field names are case sensitive. I'm not sure does the exception occur only at schemageneration?Exception Description: The attribute [keyField1] was not found on the embeddable class [class ch04.embedded.model.EmbeddableKey]. It is referenced in an attribute override for the embedded attribute [embeddedData] on class [class ch04.embedded.model.Employee].
- 
				kdmandawe
- Posts: 16
- Joined: Sun Aug 04, 2013 9:54 am
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.415 :
Any update on sztgeza's post above? If that's indeed a typo, please update the question bank..
Many thanks,
Kenneth
			
			
									
									
						Many thanks,
Kenneth
- 
				admin
- Site Admin
- Posts: 10441
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.415 :
Yes, he is right. The field in the class should be keyField1. Fixed.
thank you for your feedback!
Paul.
			
			
									
									
						thank you for your feedback!
Paul.
Who is online
Users browsing this forum: No registered users and 88 guests