| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one |
| ~ or more contributor license agreements. See the NOTICE file |
| ~ distributed with this work for additional information |
| ~ regarding copyright ownership. The ASF licenses this file |
| ~ to you under the Apache License, Version 2.0 (the |
| ~ "License"); you may not use this file except in compliance |
| ~ with the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, |
| ~ software distributed under the License is distributed on an |
| ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~ KIND, either express or implied. See the License for the |
| ~ specific language governing permissions and limitations |
| ~ under the License. |
| --> |
| <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" |
| "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> |
| |
| <hibernate-mapping> |
| |
| <joined-subclass name="org.jsecurity.samples.sprhib.party.User" table="users" |
| extends="org.jsecurity.samples.sprhib.party.Person"> |
| |
| <key column="user_id" foreign-key="users_user_id_fk"/> |
| |
| <property name="username" not-null="true" unique-key="users_username_uq" index="users_username_idx"/> |
| |
| <property name="password" not-null="true"/> |
| |
| <property name="passwordResetKey" column="password_reset_key" unique-key="users_password_reset_key_uq"/> |
| |
| <property name="passwordResetKeyTimestamp" column="password_reset_key_timestamp"/> |
| |
| <property name="lastLoginTimestamp" column="last_login_timestamp"/> |
| |
| <property name="lockTimestamp" column="lock_timestamp"/> |
| |
| <property name="sessionTimeoutEnabled" column="session_timeout_enabled" not-null="true"/> |
| |
| <set name="roles" table="user_role_maps" cascade="none"> |
| <cache usage="read-write"/> |
| <key column="user_id" foreign-key="user_role_maps_user_id_fk"/> |
| <many-to-many class="org.jsecurity.samples.sprhib.security.Role" column="role_id" |
| foreign-key="user_role_maps_role_id_fk"/> |
| </set> |
| |
| |
| </joined-subclass> |
| |
| </hibernate-mapping> |