Sorry, I mean the SetAttribute(s) method.
Jeffrey Zhao
Blog: http://www.cnblogs.com/JeffreyZhao
Twitter: http://twitter.com/jeffz_cn
--
From: Jeffrey Zhao je...@live.com
Sent: Tuesday, August 18, 2009 6:28 PM
To: nhusers@googlegroups.com
Subject
, then the problem is the Linq
2009/8/15 Jeffrey Zhao je...@live.com
Hello, I met a problem when use NHibernate.Linq to get single entity with
eager load. For example I've a the models like:
public class Product { ... }
public class Product
{
public virtual int ProductID { get; set
I've an one-to-one assocation and tried to get lazy load. I get a lot of
information of (N)Hibernate from search engine, but it confused me even more.
Some people say that I cannot get this but some others say yes. I tried with
these information but failed. Here's what I use as the model:
It's very weird. That's my mapping, can anyone find the difference?
hibernate-mapping xmlns=urn:nhibernate-mapping-2.2 assembly=NHTest
namespace=NHTest
class name=User table=`User`
id name=UserID type=Int32 column=UserID
generator class=identity /
/id
one-to-one name=Detail
And, if I set the Parent's id generate policy to identity, an error null
id generated for:NHTest.Child would be thrown.
But things would be OK if I use native and provide an ID before saving.
Blog: http://www.cnblogs.com/JeffreyZhao/
Twitter: http://twitter.com/jeffz_cn
a
persistent-layer based on ORM ;) ).
2009/8/15 Jeffrey Zhao je...@live.com
Tried but nothing changed.
Blog: http://www.cnblogs.com/JeffreyZhao/
Twitter: http://twitter.com/jeffz_cn
--
From: hival hi...@ukr.net
Sent: Saturday
Hello,
I'm a new for NH and I met the problem of how can I delete an entity. For
example, I've got two entity with an one-to-many association.
Here's the sql to build the table (omit the association):
CREATE TABLE [dbo].[Property](
[PropertyID] [int] IDENTITY(1,1) NOT NULL,
[ProductID]
://vanryswyckjan.blogspot.com/2008/04/nhibernate-20-and-cascading-deletes.html
On 14 Aug., 11:12, Jeffrey Zhao je...@live.com wrote:
Hello,
I'm a new for NH and I met the problem of how can I delete an entity.
For example, I've got two entity with an one-to-many association.
Here's the sql to build
/set
This makes it a list of value-type-alike instances. Property will not
have an id anymore.
See http://nhforge.org/doc/nh/en/index.html#components
And - why is it a set if you need a sort order? It should probably be
a list.
On 14 Aug., 12:38, Jeffrey Zhao je...@live.com wrote
Property
{
public virtual string Name { get; set; }
}
And the table would have this columns:
ProductId (foreign key to product)
SortOrder
Name
On 14 Aug., 14:44, Jeffrey Zhao je...@live.com wrote:
For the last question, the reason I use Set is that List in NH
mapping
has an index. I
Everything's fine after creating an bi-directional association with an
IListProperty in model.
Thanks, Stefan.
Blog: http://www.cnblogs.com/JeffreyZhao/
Twitter: http://twitter.com/jeffz_cn
--
From: Jeffrey Zhao je...@live.com
Sent: Friday
Hello, I met a problem when use NHibernate.Linq to get single entity with eager
load. For example I've a the models like:
public class Product { ... }
public class Product
{
public virtual int ProductID { get; set; }
public virtual string Name { get; set; }
public virtual
CreateTime LastUpdated
1 123 123.0 2009:xx:xx 2009:xx:xx
Thanks
Jeffrey Zhao
Blog: http://www.cnblogs.com/JeffreyZhao
Twitter: http://twitter.com/jeffz_cn
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
But component mapping cannot implement lazy load. Any ways to get both
single table one-to-one mapping and lazy load?
Jeffrey Zhao
Blog: http://www.cnblogs.com/JeffreyZhao/
Twitter: http://twitter.com/jeffz_cn
--
From: hival hi...@ukr.net
Sent
Subject: [nhusers] Re: Mapping one-to-one relationship in a single table
lazy loading for components does not have any sense.
2009/8/10 Jeffrey Zhao je...@live.com
But component mapping cannot implement lazy load. Any ways to get both
single table one-to-one mapping and lazy load
Subject: [nhusers] Re: Mapping one-to-one relationship in a single table
lazy loading for components does not have any sense.
2009/8/10 Jeffrey Zhao je...@live.com
But component mapping cannot implement lazy load. Any ways to get both
single table one-to-one mapping and lazy load
16 matches
Mail list logo