Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Java [игнор отключен] [закрыт для гостей] / Hibernate / 2 сообщений из 2, страница 1 из 1
24.11.2005, 11:35
    #33396673
borgi
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Hibernate
Люди кто работал подскажите как сделать сохранение наследуемых классов и Hashtale c помощью Hibernate. Классы самые простые:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
 public   class  Car {
   private   int  _width;
   private   int  _length;
   private   int  _weigth;
   private  Colors _color;
}

 public   class  Bus : Car {
   private   int  _placeCount;
   private  BusType _busType;
   private  Hashtable _personal;
}

 public  enum TruckTypes {
  DumpTruck,
  Trailers
}

 public   class  Truck : Car {
   private   int  _maxWeight;
   private  TruckTypes _truckType;
   private  ArrayList _goods;
}
...
Рейтинг: 0 / 0
25.11.2005, 13:04
    #33399831
borgi
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Hibernate
C hibernate ни кто не работал что ли? (
В данный момент у меня получается
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
<class name = "Car" table="Car">
		<id column="id"  type="Int32">
			<generator class="native" />
		</id>
		<property name="Width" type="Int32" />
		<property name="Length" type="Int32" />
		<property name="Weigth" type="Int32" />
		<property name="Color" type="Int32" />
		<joined-subclass name="Bus" table="Bus">
			<key column="idBus"/>
			<property name="PlaceCount" type="Int32" />
			<property name="BusType" type="Int32" />
			<set name="Personal" lazy="true" table="Man">
				<key column="idBus"/>
				<one-to-many class="Man"/>
			</set>
		</joined-subclass>
	</class>
но выдаётся ошибка could not insert: [GarageManager.BLL.Bus]
...
Рейтинг: 0 / 0
Форумы / Java [игнор отключен] [закрыт для гостей] / Hibernate / 2 сообщений из 2, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]