Set album as parent of added image.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 12 Apr 2011 19:59:26 +0000 (21:59 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Apr 2011 04:41:06 +0000 (06:41 +0200)
src/main/java/net/pterodactylus/sone/data/Album.java

index a0a85de..88bef2c 100644 (file)
@@ -158,6 +158,7 @@ public class Album implements Fingerprintable {
         */
        public void addImage(Image image) {
                Validation.begin().isNotNull("Image", image).check().isNotNull("Image Owner", image.getSone()).check().isEqual("Image Owner", image.getSone(), sone).check();
+               image.setAlbum(this);
                images.add(image);
        }