SubscribeIn the case of Flickr, they have separate image servers which dont get requests more complex than "get this specific image" or "here's a new image to add to your catalog" so you can optimize those databases differently.
select p.* from users u join roles r on u.role_id = r.id join privileges p on r.privilege_id = p.id where u.id=12345...which will give you a List of Privileges for a particular user, you can do this:
User u = getUserDao().getById(12345);This works because you've created mapping files for each object that correlate to a table in the database. When you fetch the object, Hibernate creates the initial query for you, and lazy-loads any elements of the object graph that you don't necessarily need right away. That just means it keeps a placeholder for you until you try and access it, at which point it generates the SQL and makes the request.
Listprivileges = u.getRole().getPrivileges();
You are not logged in, either login or create an account to post comments
posted by mpls2 at 9:51 AM on February 4