Hi Steven,
That is only half the issue, unfortunately. The other half is that
RIFE user IDs are 64-bit integers, but as far as I can tell there's
no way to use a "long" field as an identifier with the
GenericQueryManager. It wants to use "int" IDs and complains if I
don't. (I'm assuming this is a well-known limitation, so I won't
bother providing example errors, but I can do so if you like.)
Good point, which has already come up in the past already.
Actually, the lack of "long" IDs is kind of a bad thing in other
respects too; I've worked on apps in the past that have had to deal
with IDs greater than 2 billion, in some cases because there really
were that many rows, and in some because IDs weren't sequentially
assigned for various reasons, so we needed more than 32 bits even
though we had fewer than 2 billion rows.
Is there some way around this?
Theoretically, yes. Practically we're kinda stuck with the API of the
GenericQueryManager. Adding support for it with a BeanType restore
(long) method is no problem at all, however it's less easy with int
update(BeanType bean), int save(BeanType bean) and int
getIdentifierValue(BeanType bean) since you can just overload
primitive return types. I sadly can't really think of an elegant
solution besides creating a GenericQueryManagerLong interface and all
the related classes, or using the Number interface instead where int
is used. Not sure about the performance of the latter though since
objects will have to be created for each and every use of identifier
values. Suggestions about how to solve this are very welcome!
I also didn't see a more elegant way to do the many-to-one
constraint between Account and RoleUser, but it's entirely
possible there is one I'm not aware of. At the very least I
imagine there's a more elegant way to look up the RoleUser table
name.
Oops, there was one more question there. :) Is there in fact an
official, clean way to look up the RoleUser table name?
RifeConfig.Authentication.getTableUser() should give you that.
Best regards,
Geert
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users