NHibernate Inventory getting close, except for some of the
complex folder queries.0.6.0-stable
parent
be2bc9c6fe
commit
ea16221c1b
|
@ -25,15 +25,19 @@ my $items = "INSERT INTO InventoryItems(ID, AssetID, AssetType, InvType, Folder,
|
|||
my $folders = "INSERT INTO InventoryFolders(ID, Name, Owner, ParentID, Type, Version) ";
|
||||
|
||||
open(SQLITE, "sqlite3 inventoryStore.db .dump |") or die "can't open the database for migration";
|
||||
open(WRITE,"| sqlite3 Inventory.db");
|
||||
|
||||
while(my $line = <SQLITE>) {
|
||||
$line =~ s/([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})/$1-$2-$3-$4-$5/g;
|
||||
if($line =~ s/(INSERT INTO "inventoryitems")/$items/) {
|
||||
print $line;
|
||||
print WRITE $line;
|
||||
}
|
||||
if($line =~ s/(INSERT INTO "inventoryfolders")/$folders/) {
|
||||
print $line;
|
||||
}
|
||||
|
||||
print WRITE $line;
|
||||
}
|
||||
}
|
||||
|
||||
close(WRITE);
|
||||
close(SQLITE);
|
||||
|
|
|
@ -77,7 +77,7 @@ namespace OpenSim.Data.NHibernate
|
|||
HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly()))
|
||||
cfg.AddInputStream(stream);
|
||||
|
||||
new SchemaExport(cfg).Create(true, true);
|
||||
// new SchemaExport(cfg).Create(true, true);
|
||||
|
||||
factory = cfg.BuildSessionFactory();
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="OpenSim.Framework.InventoryFolderBase, OpenSim.Framework" table="InventoryItems" lazy="false">
|
||||
<class name="OpenSim.Framework.InventoryFolderBase, OpenSim.Framework" table="InventoryFolders" lazy="false">
|
||||
<id name="ID" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate">
|
||||
<generator class="assigned" />
|
||||
</id>
|
||||
<property name="Type" type="short" />
|
||||
<property name="Version" type="short" />
|
||||
<property name="ParentID" index="parent_id" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="Owner" index="owner_id" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="ParentID" index="folder_parent_id" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="Owner" index="folder_owner_id" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="Name" type="String" length="64" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
|
@ -7,8 +7,8 @@
|
|||
<property name="InvType" type="int" />
|
||||
<property name="AssetType" type="int" />
|
||||
<property name="AssetID" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="Folder" index="folder_id" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="Owner" index="owner_id" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="Folder" index="item_folder_id" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="Owner" index="item_owner_id" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="Creator" type="OpenSim.Data.NHibernate.LLUUIDString, OpenSim.Data.NHibernate" />
|
||||
<property name="Name" type="String" length="64" />
|
||||
<property name="Description" type="String" length="64" />
|
||||
|
|
Loading…
Reference in New Issue