[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] New values on a @OneToMany attribute gets persisted even no cascading is specified
|
I have this mapping in CalendarEntry:
@OneToMany(fetch = FetchType.LAZY, mappedBy = "activityForOwner")
var attendees: JUList[CalendarAttendee] = new JUArrayList[CalendarAttendee]()
With no "cascade". The other end looks like this:
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "activity_id")
@net.sf.oval.constraint.NotNull
var activityForOwner: CalendarEntry = null
When I persist (both insert and update) the CalendarEntry, new values in "attendees" are persisted also. I find this surprising because I have no cascade-attribute on the relationship. Comming from Hibernate this makes no sense. I want the attendees-attribute to be treated read-only.
Is this correct behaviour?
Thanks.
--
Andreas Joseph Krogh <andreak@xxxxxxxxxxxx> mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc