yeah, the other way around On Sun, Dec 7, 2008 at 10:40 AM, sirrocco <[EMAIL PROTECTED]> wrote:
> > But why a one-to-may -> I mean one project can be modified by one > user , and one user has many projects. - shouldn't it be many-to- > one ? > > And do you know if fluentnhibernate supports a many-to-one mapping ? I > couldn't find it anywhere. > > On Dec 7, 10:13 am, "Ayende Rahien" <[EMAIL PROTECTED]> wrote: > > one-to-one should be one to many > > > > On Sun, Dec 7, 2008 at 10:09 AM, sirrocco <[EMAIL PROTECTED]> wrote: > > > > > I have the folowing mapping file : > > > > > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default- > > > lazy="false" assembly="X" namespace="X.Entities"> > > > <class name="Project" table="[Project]" xmlns="urn:nhibernate- > > > mapping-2.2"> > > > <id name="ProjectId" column="ProjectId" type="Int32"> > > > <generator class="identity" /> > > > </id> > > > <property name="Description" column="Description" length="255" > > > type="String" not-null="true"> > > > <column name="Description" /> > > > </property> > > > <property name="ProjectCode" column="ProjectCode" length="20" > > > type="String" not-null="true"> > > > <column name="ProjectCode" /> > > > </property> > > > <property name="ProjectName" column="ProjectName" length="100" > > > type="String" not-null="true"> > > > <column name="ProjectName" /> > > > </property> > > > <bag name="ProjectFiles" lazy="true" cascade="save-update"> > > > <key column="ProjectId" /> > > > <one-to-many class="Undrtake.Core.Entities.UploadedFile, > > > Undrtake.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" > / > > > > > </bag> > > > <bag name="AssignedUsers" lazy="true" cascade="none"> > > > <key column="ProjectId" /> > > > <one-to-many class="X.Entities.ProjectUsers, X, Version=1.0.0.0, > > > Culture=neutral, PublicKeyToken=null" /> > > > </bag> > > > <one-to-one cascade="none" fetch="join" name="Owner" > > > class="X.Entities.User, X, Version=1.0.0.0, Culture=neutral, > > > PublicKeyToken=null" /> > > > <component name="Timestamp" insert="true" update="true"> > > > <property name="CreatedDate" column="CreatedDate" > > > type="DateTime"> > > > <column name="CreatedDate" /> > > > </property> > > > <property name="ModifiedDate" column="ModifiedDate" > > > type="DateTime"> > > > <column name="ModifiedDate" /> > > > </property> > > > <one-to-one cascade="none" fetch="join" name="CreatedBy" > > > class="X.Entities.User, X, Version=1.0.0.0, Culture=neutral, > > > PublicKeyToken=null" /> > > > <one-to-one cascade="none" fetch="join" name="ModifiedBy" > > > class="X.Entities.User, X, Version=1.0.0.0, Culture=neutral, > > > PublicKeyToken=null" /> > > > </component> > > > </class> > > > </hibernate-mapping> > > > > > It was generated using fluent nhibernet. Now , on > > > GenerateSchemaCreationScript - all the fields are generated ok EXCEPT > > > for the CreatedBy and ModifiedBy in the Component. Those fields are > > > not generated at all - byt the CreatedDate is . > > > > > What could be the problem ? > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---