added new ParentUUID property to map out from SOP.
Updated some nhibernate parts, started in on migration.0.6.0-stable
parent
d75cacb050
commit
b5efb49d74
|
@ -52,7 +52,7 @@ namespace OpenSim.Data.NHibernate
|
|||
|
||||
private Configuration cfg;
|
||||
private ISessionFactory factory;
|
||||
//private ISession session;
|
||||
private ISession session;
|
||||
|
||||
public void Initialise()
|
||||
{
|
||||
|
@ -89,11 +89,11 @@ namespace OpenSim.Data.NHibernate
|
|||
cfg.AddInputStream(stream);
|
||||
|
||||
factory = cfg.BuildSessionFactory();
|
||||
//session = factory.OpenSession();
|
||||
session = factory.OpenSession();
|
||||
|
||||
// This actually does the roll forward assembly stuff
|
||||
Assembly assem = GetType().Assembly;
|
||||
Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "AssetStore");
|
||||
Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "RegionStore");
|
||||
m.Update();
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,18 @@ namespace OpenSim.Data.NHibernate
|
|||
/// <param name="regionUUID">the region UUID</param>
|
||||
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID)
|
||||
{
|
||||
//NHPrim[] prims = (NHPrim[]) obj.GetParts();
|
||||
foreach (SceneObjectPart part in obj.Children.Values)
|
||||
{
|
||||
try
|
||||
{
|
||||
session.SaveOrUpdate(part);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("Can't save: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
CREATE TABLE `prims` (
|
||||
`ParentID` int(11) default NULL,
|
||||
`CreationDate` int(11) default NULL,
|
||||
`Name` varchar(255) default NULL,
|
||||
`ParentUUID` char(36) default NULL,
|
||||
`Text` varchar(255) default NULL,
|
||||
`Description` varchar(255) default NULL,
|
||||
`SitName` varchar(255) default NULL,
|
||||
`TouchName` varchar(255) default NULL,
|
||||
`ObjectFlags` int(11) default NULL,
|
||||
`OwnerMask` int(11) default NULL,
|
||||
`NextOwnerMask` int(11) default NULL,
|
||||
`GroupMask` int(11) default NULL,
|
||||
`EveryoneMask` int(11) default NULL,
|
||||
`BaseMask` int(11) default NULL,
|
||||
`PositionX` float default NULL,
|
||||
`PositionY` float default NULL,
|
||||
`PositionZ` float default NULL,
|
||||
`GroupPositionX` float default NULL,
|
||||
`GroupPositionY` float default NULL,
|
||||
`GroupPositionZ` float default NULL,
|
||||
`VelocityX` float default NULL,
|
||||
`VelocityY` float default NULL,
|
||||
`VelocityZ` float default NULL,
|
||||
`AngularVelocityX` float default NULL,
|
||||
`AngularVelocityY` float default NULL,
|
||||
`AngularVelocityZ` float default NULL,
|
||||
`AccelerationX` float default NULL,
|
||||
`AccelerationY` float default NULL,
|
||||
`AccelerationZ` float default NULL,
|
||||
`RotationX` float default NULL,
|
||||
`RotationY` float default NULL,
|
||||
`RotationZ` float default NULL,
|
||||
`RotationW` float default NULL,
|
||||
`SitTargetOffsetX` float default NULL,
|
||||
`SitTargetOffsetY` float default NULL,
|
||||
`SitTargetOffsetZ` float default NULL,
|
||||
`SitTargetOrientW` float default NULL,
|
||||
`SitTargetOrientX` float default NULL,
|
||||
`SitTargetOrientY` float default NULL,
|
||||
`SitTargetOrientZ` float default NULL,
|
||||
`UUID` char(36) NOT NULL default '',
|
||||
`RegionID` char(36) default NULL,
|
||||
`CreatorID` char(36) default NULL,
|
||||
`OwnerID` char(36) default NULL,
|
||||
`GroupID` char(36) default NULL,
|
||||
`LastOwnerID` char(36) default NULL,
|
||||
PRIMARY KEY (`UUID`),
|
||||
KEY `prims_regionuuid` (`RegionID`),
|
||||
KEY 'prims_parentuuid' ('ParentUUID')
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
|
@ -920,6 +920,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
get { return ParentGroup.Scene.RegionInfo.RegionID; }
|
||||
}
|
||||
[XmlIgnore]
|
||||
public LLUUID ParentUUID
|
||||
{
|
||||
get { return ParentGroup.UUID; }
|
||||
}
|
||||
|
||||
#endregion Public Properties with only Get
|
||||
|
||||
|
|
Loading…
Reference in New Issue