Hi Fabio,
That is how I currently handle it in our dao's:
public TProxy LoadTEntity, TProxy(object id)
{
return (TProxy) session.Load(typeof(TEntity), id);
}
Remco
On Oct 12, 7:49 pm, Fabio Maulo fabioma...@gmail.com wrote:
It seems to be a feature request:session.LoadTMappedClass,
I have a Parent object with a list of Child objects (one-to-many,
cascade-all)
and each Child object has an Optional component (many-to-one, cascade-
all)
ie Parent 1* Child 10/1 Optional
When doing a flush/commit i get this error: object references an
unsaved transient instance but
You can do it in the mapping like this:
property name=SomeProperty
column default=myValue /
/property
Be aware that this doesn't actually create default values for your C#
objects. You will need to still do that the traditional way:
public class MyEntity
{
private string _someProperty
Hi,
The following does not work :
ICriteria criteria = SessionManager.GetCurrentSession().CreateCriteria
(typeof(BuzzUserArt));
criteria.SetCacheable(true).CreateAlias(Owner, owner).Add
(Expression.Like(owner.FullName, suggest,
MatchMode.Anywhere).IgnoreCase());
criteria.SetProjection(
After giving it some thought, I should be able to implement
EncryptedBinary which should be a simplified version of the
EncryptedString.
This difference being that the EncryptedString accepts and returns
encoded strings whereas the EncryptedBinary will directly work off Byte
[].
i am going to
well done.
2009/10/14 Remco Ros r@rawsoft.nl
Hi Fabio,
That is how I currently handle it in our dao's:
public TProxy LoadTEntity, TProxy(object id)
{
return (TProxy) session.Load(typeof(TEntity), id);
}
Remco
On Oct 12, 7:49 pm, Fabio Maulo fabioma...@gmail.com wrote:
It
I'm trying to persist a class which extends another class. If I pass
the superclass to NHibernate I get a no persister for mySuperType
which is understandable.
So I've tried to extract an interface from my base type and change the
mapping to use that, but I get the same error. The two classes
hi, the domain is something like this: a PERSON who has an ilist of
ADDRESSES, each ADDRESS has a CITY, each CITY has a STATE, each STATE
has a COUNTRY
PERSON - ADDRESSES - CITY - STATE - COUNTRY
all clases are mapped as proxies, so my form receives a person, with
its proxied addreses, ergo,
10x acl123, but why NHib has such an option then? What is the real
purpose of column default=myValue / ?
On Oct 14, 11:03 am, acl123 andrewclawre...@gmail.com wrote:
You can do it in the mapping like this:
property name=SomeProperty
column default=myValue /
/property
Be aware that
If it makes a difference, I only ever need to retrieve the entities as
their basetype. So regardless of which class is passed to NHibernate
the interface properties should always be serialized, but the base
type will always be returned.
--~--~-~--~~~---~--~~
You
I am using Fluent Nhibernate for the mapping files. I have defined the
CustomSqlType as BinaryBlob in the mapping file for the attachment
column. I suspect I might have to create a new IUserType to work
with BinaryBlob type.
On Oct 13, 3:34 pm, Tuna Toksoz tehl...@gmail.com wrote:
It is
Hi,
I'm new to using nHibernate.
I'm trying to use the check constraint as the column in the database
has a constraint that the value must be between 0 and 31.
How would I express that in the check constraint? I am battling to
find examples on the internet.
[Property(CollectionDay, ColumnType =
All,
In my application I have a repository layer which wraps access to
database queries. As NH-Linq has come on the scene we've started using
his a lot more for new apps.
However, as Linq queries are deferred until first use, I'm not sure
how to deal with common DB errors that can be retried -
Even better:
using (IFullTextSession searchSession = Search.CreateFullTextSession
(session))
{
searchSession.Index(entity);
}
Thanks, Ayende!
On Oct 13, 2:36 pm, Ricardo Peres rjpe...@gmail.com wrote:
Found it: I had forgot the tx.Commit()!
On Oct 12, 11:51 am, Ricardo Peres
Hi,
NhProf keeps telling me that on _some_ requests of my webb app my
session/transactions seem to use multiple threads.
And the server sometimes enters into a race condition, where too many
requests kill sql server (problems with closing transactions that are
already disposed of, sounding just
I'm trying to implement change tracking for my aggregate roots using
Ayende's method found at
http://ayende.com/Blog/archive/2009/06/11/nhibernate-ndash-automatic-change-tracking-for-aggregate-roots-in-ddd.aspx.
I have 2 entities: TestProject and TestClass.
Here are my mappings:
class
Hello all,
I am using NHibernate with Fluent to generate sql scripts to a PostGre
DB. The problem is that the script generated doesn't has the quotes
around the column declarations. Even if you witre the column names in
uper case without the quotes, PostGre creates the columns all lower
case.
have you tried configuring lazy=false on the address-city, city-
state and state-country links?
On Oct 14, 11:24 pm, Raul Carlomagno rcarloma...@gmail.com wrote:
hi, the domain is something like this: a PERSON who has an ilist of
ADDRESSES, each ADDRESS has a CITY, each CITY has a STATE, each
18 matches
Mail list logo