Hi Henk,
I'm making good progress in my first Rife application,
That's good to hear!
but I am still confused about a few things.
That's less good to hear ;-)
I didn't find a good answer in the docs either. It's about the
manytoone constraint one can put in a metadata class. What does
this do ? I read I can provide it a table name and a field. So
does this mean at the time of validation, e.g. the id is checked
for its presence in this table ?
Yes, if you provide a ValidationContext during the validate method.
Or can it do other things too ?
Besides the validation, it's also used by RIFE/Crud for instance, to
generate the relations for you in the interfaces. Also, when you
create tables using RIFE, the correct foreign key constraints will be
added.
I think I understand it does not allow one to restore related objects.
Not yet, we haven't fully decided yet on what would be the best
strategy to do so. If you have any ideas about this, please feel free
to comment on the related issues:
http://uwyn.com/issues/browse/RIFE-233
http://uwyn.com/issues/browse/RIFE-165
That's something I need to do in the afterRestore() callback,
right ?. But that leaves me with a bad feeling because it means I
have to put database code in my simple pojo bean. Or can I solve
this like the Metadata thing : add an extra class with a well
defined name (MyBeanCallback e.g.) that handles the callbacks.
Yes, you can use the meta data merging for this without any problems.
How are you guys solving this ?
Personally, I'm fetching or iterating over collections or related
entities manually by using the ID of the associated entity.
Next thing is a select list that gets filled with the contents of a
db table. Is the only way to accomplish this, adding an inList
constraint with the ids and next add a resourcebundle ?
This is currently the easiest way to do this:
http://rifers.org/docs/api/com/uwyn/rife/site/SelectResourceBundle.html
I confess this is not that big a deal, but since Rife is about
simplicity, maybe I am missing something here.
However I also think this is a tad too convoluted for my taste.
Sadly, I'm unable to find a more concise design that still respects
all the required concern separation. If you have any suggestions
about improving this, please let us know.
thanks a lot
Henk
BTW : I've decided to put my Rife progress on my blog at
www.marsman-it.be .
Great! Make sure to register your blog on javablogs.com, any coverage
of RIFE is good for its credibility (even if there are things you
don't like).
Best regards,
Geert
--
Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED]
"Use what you need" Avenue de Scailmont 34 Skype: gbevin
http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin
gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users