Login with  Log in with facebook
Hiring Manager? SIGN UP HERE

what is the difference between the two @Embeddable and @Embedded

Rishi Yadav
09/11/2011 at 09:11
1 Answer

You should use @AttributeOverride (only one column) or @AttributeOverrides if more than one if you you to override default settings

Use instead

public class Foo {

    private DateInterval dateInterval;

        @AttributeOverride(name="startDate", column=@Column(nullable=true)),
        @AttributeOverride(name="endDate", column=@Column(nullable=true))
    public DateInterval getDateInterval() { return this.dateInterval; }
    public void setDateInterval(DateInterval dateInterval) { this.dateInterval = dateInterval; }


Maneshwar Meel
09/14/2011 at 22:22

If you want to post any answer to this forum then you need to log in.
Schedule a Demo

Schedule a Demo with us

Name *
Email *
Phone *
Company *