MagmaCollection problem

Oleg Korsak kamikaze.is.waiting.you at gmail.com
Thu Feb 14 17:37:32 UTC 2008


Hello!

I have an empty magma database (I'm using Keithy's ToDo tutorial application
with Magma seasideHelper). This one: http://wiki.squeak.org/squeak/6021
So please get the latest version (7) so you can answer on my question :)

In the StMagmaDatabase->#createDefaultUser (which is temporary called from
#findUserByEmail) I'm initializing a database and adding one user with '
todo at todo.tut' email:

    | user |

    self initialize.

    user := StUser new.
    user id: 1.
    user email: 'todo at todo.tut'.
    user userName: 'todo'.
    user password: 'todo'.
    self addUser: user.

then I'm trying to find user by email ('todo at todo.tz'). BUT... I'm getting a
wrong result

    user := self users where: [:each |
            each read: #email at: 'todo.tz'.
        ].

    user first explore.

user first  returns the first user in MagmaCollection with the WRONG email
('todo at todo.tz').

So how can I get nil in this case? (because there is no user with such email
in database).
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/magma/attachments/20080214/f5de8a24/attachment.htm


More information about the Magma mailing list