Open GoogleCodeExporter opened 9 years ago
Original comment by TimothyCLethbridge
on 24 Jul 2014 at 3:01
Original comment by TimothyCLethbridge
on 12 Sep 2014 at 12:25
[deleted comment]
It looks like this is occurring due to a misunderstanding of the
List.contains().
For example:
Object One = new Object("One")
List.add(One)
Object Two = new Object("One")
if(List.contains(Two)) {
return false //Will never return false, as they are different references with the same attributes.
}
This is why our List does not throw an exception when adding multiples.
Original comment by EmailMarkGalloway@gmail.com
on 14 Sep 2014 at 4:28
It is important that for ordinary associations the current semantics is
maintained.
It will be OK in a regular pair of associations such as
class Flight { Integer number; }
class Passenger { name; }
class Booking {
* -- 1 Flight;
* -- 1 Passenger;
lazy seat;
}
To create two Bookings that are to the same flight and passenger.
However, Booking is an associationClass, as in issue 610, then there
should be a run-time error. This means generating slightly different code
in that case.
Note also that the whole mechanism of failure on construction at run time needs
to be studied to see how it works in other cases where run time construction
does not work.
It should also be impossible to change the passenger or flight of a Booking.
Original comment by TimothyCLethbridge
on 14 Sep 2014 at 3:44
Upon discussion the likely solution is to 'automatically' make the associations
to be associated into elements of the key. If there is already a key, issue a
warning if it doesn't have these associations in it.
Original comment by TimothyCLethbridge
on 17 Sep 2014 at 9:41
Everything regarding this task, including the the internal key and issued
warning are complete, except for the added criteria: "It should also be
impossible to change the passenger or flight of a Booking."
Original comment by EmailMarkGalloway@gmail.com
on 11 Oct 2014 at 1:34
for the above comment, the revision is r4601
Original comment by EmailMarkGalloway@gmail.com
on 11 Oct 2014 at 2:15
Original comment by EmailMarkGalloway@gmail.com
on 3 Dec 2014 at 10:49
Original issue reported on code.google.com by
TimothyCLethbridge
on 24 Jul 2014 at 2:12