From 8c0ec958026ae128e6427216fbf2d67125e991d6 Mon Sep 17 00:00:00 2001 From: jackbravo Date: Thu, 6 Sep 2007 16:17:49 +0000 Subject: [PATCH] code type is sql --- .../docs/en/object-relational-mapping/record-identifiers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/new/docs/en/object-relational-mapping/record-identifiers.txt b/manual/new/docs/en/object-relational-mapping/record-identifiers.txt index f16ffe1d2..91f0d92bd 100644 --- a/manual/new/docs/en/object-relational-mapping/record-identifiers.txt +++ b/manual/new/docs/en/object-relational-mapping/record-identifiers.txt @@ -37,7 +37,7 @@ Consider three classes Permission, Role and RolePermission. Roles having many pe Now adding autoincremented primary keys to these classes would be simply stupid. It would require more data and it would make the queries more inefficient. For example fetching all permissions for role 'Admin' would be done as follows (when using autoinc pks): - + SELECT p.* FROM Permission p LEFT JOIN RolePermission rp ON rp.permission_id = p.id @@ -47,7 +47,7 @@ SELECT p.* Now remember sql JOINS are always expensive and here we are using two of those. When using natural identifiers the query would look like: - + SELECT p.* FROM Permission p LEFT JOIN RolePermission rp ON rp.permission_name = p.name