information on this on the Internet, and the
documentation is outdated.
Thanks,
Ricardo Peres
--~--~-~--~~~---~--~~
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
/
/class
/hibernate-mapping
As you can see, A is the main class, and E holds a reference to an A
object, which is also the primary key. Where does the foreign
generator fits in?
Thanks,
Ricardo Peres
On Jun 8, 1:27 pm, Fabio Maulo fabioma...@gmail.com wrote:
generator=foreing
2009/6/8 Ricardo
= session.CreateCriteriaSomeClass(p).Add
(NHibernate.Criterion.Expression.Gt(p.Children.Count,
0)).ListSomeClass();
var l3 = (from l in session.LinqSomeClass() where l.Children.Count
0 select l).ToList();
var l4 = session.LinqSomeClass().Where(l = l.Children.Count
0).ToList();
Can you help?
Thanks,
Ricardo Peres
, Ricardo Peres rjpe...@gmail.com wrote:
Hello,
I have this simple class:
public class SomeClass
{
public Int32 Id { get; set; }
public SomeClass Parent { get; set; }
public ISetSomeClass Children { get; set; }
}
As you can see, it maps a simple table which is related
perfectly. I basically have an Id, a Parent and a Children
properties, I am mapping a parent-child relationship.
The exception I get is:
QueryException: could not resolve property: Children.Id of:SomeClass
Any ideas? Where can I get more support for LINQ to NHibernate?
Thanks,
Ricardo Peres
, Aug 12, 2009 at 12:57 PM, Ricardo Peres rjpe...@gmail.com wrote:
Hi,
I have made this answer days ago, but no one answered... Here I go
again. I can't run this query:
var lll = (from l in session.LinqSomeClass()
where l.Children.Count
Read this post and see if it applies:
http://weblogs.asp.net/ricardoperes/archive/2009/08/20/using-nhibernate-validator-1-0-with-nhibernate-2-1.aspx
On Aug 11, 5:54 pm, Tomasz Modelski (IDev)
modelski.tom...@gmail.com wrote:
Hi.
Where can I find Burrow compiled with latest NHibernate 2.1.0
) that goes all the way
to the presentation layer, which is the better option for doing so, so
that it is possible to enhance the original query?
Thanks,
Ricardo Peres
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
nhusers
Are there any good examples of query classes, other than specification
(which are already implemented, for example, in NCommon)?
There are two different scenarios, I believe:
- If there is need to cross application domains (e.g., web services or
remoting)
- If not
What would such a class look
in
all .hbm.xml files the corresponding mapping, or can I use something
like an abstract base class (or interface, in this case) mapping?
Thanks,
Ricardo Peres
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
nhusers
Hello,
What would be the best way to implement restriction of data for a
given user?
For example, let's say I have a table which connects users with some
products; what I want is, when I fetch products, I want to see only
those that I have access to.
Any ideas?
Thanks,
RP
://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike
On Mon, Sep 7, 2009 at 2:06 PM, Ricardo Peres rjpe...@gmail.com wrote:
Hello,
What would be the best way to implement restriction of data for a
given user?
For example, let's say I have a table which connects
/tehlike
On Mon, Sep 7, 2009 at 2:15 PM, Ricardo Peres rjpe...@gmail.com wrote:
If necessary, I can use filters, but I was looking for something on
the NHibernate pipeline that would let me inject custom criterias...
Does this exist?
On Sep 7, 7:12 pm, Tuna Toksoz tehl...@gmail.com wrote
On Sep 7, 7:05 pm, Ricardo Peres rjpe...@gmail.com wrote:
Hello again,
Suppose I have an interface like this:
public interface IAuditable
{
String CreatedBy { get; set; }
DateTime CreatedAt { get; set; }
String UpdatedBy { get; set; }
DateTime UpdatedAt { get; set
Hi,
I have asked this before, but got no answer, so here I go again: what
is the best way to perform hierarchical queries, such as Oracle's
CONNECT BY PRIOR and SQL Server's WITH?
I thought about having SQL queries (sql-query elements) and then
using a AliasToBean transformer, the problem is
But... what about multiple interfaces?
On Sep 7, 7:32 pm, Ricardo Peres rjpe...@gmail.com wrote:
Forget it:
class name=IAuditable abstract=true
property name=CreatedBy column=`CREATED_BY`/
property name=CreatedAt column=`CREATED_AT`/
property name=UpdatedBy column=`UPDATED_BY
, and then the
repository methods were written to take this into account.
/Oskar
2009/9/7 Ricardo Peres rjpe...@gmail.com:
Hmm, never used Rhino * products, so can't tell, but possibly yes.
On Sep 7, 7:16 pm, Tuna Toksoz tehl...@gmail.com wrote:
rhino security kind fo thing
Hi,
Is it possible to cancel the default processing in an event listener?
For example, in an IPreLoadEventListener or ILoadEventListener is it
possible to cancel loading of an entity?
Thanks,
RP
--~--~-~--~~~---~--~~
You received this message because you are
That's because the ChildResources is lazy loaded. Add lazy=false to
the mapping.
On Sep 14, 4:45 pm, trull...@googlemail.com
trull...@googlemail.com wrote:
I have a tree where every node is a Resource class:
public abstract class Resource
{
public virtual Guid Id { get; set; }
Hello,
Is it possible to compile a LINQ query, like it is for LINQ to SQL or
Entity Framework?
Thanks,
RP
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
nhusers group.
To post to this group, send email to
is
trying to persist my entities, I have explicitly marked the query-only
property as mutable=false and optimistic-lock=false.
Any clues?
Thanks,
Ricardo Peres
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
nhusers group
Well, I tried it after you mentioned it, but I believe it is not even
closely related to my problem, since I'm not deleting anything.
On Oct 5, 2:36 pm, webpaul goo...@webpaul.net wrote:
Have you tried cascade=none?
On Oct 4, 3:27 am, Ricardo Peres rjpe...@gmail.com wrote:
Hello,
I
/
/id
set name=RecentO mutable=false optimistic-lock=false
access=none where=(Date = (GetDate() - 30))
key column=`MID` not-null=true/
one-to-many class=O/
/set
/class
/hibernate-mapping
Thanks, anyway!
RP
On Oct 5, 9:58 pm, Ricardo Peres rjpe...@gmail.com wrote:
Well, I
You can't use an ISet if you are using an idbag, AFAIK.
On Oct 6, 8:50 am, graphicsxp graphic...@googlemail.com wrote:
Thanks guys
you pointed to the problem. I've used an ISet instead and it's working
much better now.
Oskar, would there be a benefit over ISet if I used an idbag ?*
Thanks
Harm,
See if this is what you need:
http://weblogs.asp.net/ricardoperes/archive/2009/10/09/finding-dirty-properties-in-nhibernate.aspx
On Oct 9, 10:27 am, Harm Neervens h.neerv...@gmail.com wrote:
It should be:
string className = NHibernateProxyHelper.GuessClass(entity).FullName;
3) Do
Hi,
I'm trying to manually index an entity, that is, not on the
PostInsert, PostDelete and PostUpdate events.
I have this code, which isn't doing anything:
SearchFactoryImpl searchFactory = SearchFactoryImpl.GetSearchFactory
(cfg);
Work work = new Work(entity, entity.Id, WorkType.Add); //also
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 rjpe
Hi, Gareth!
First of all, nice work! NHibernate is indeed in need of some
supporting tools; NHProf and Visual NHibernate are good examples of
such tools!
Some comments, however:
- Why aren't all properties virtual by default, or, at least, those
properties that represent relations to other
.
On 2 Dec, 12:39, Ricardo Peres rjpe...@gmail.com wrote:
Hi, Gareth!
First of all, nice work! NHibernate is indeed in need of some
supporting tools; NHProf and Visual NHibernate are good examples of
such tools!
Some comments, however:
- Why aren't all properties virtual by default
Hi,
Where can I find the new Linq provider (Steve Strong's)?
I was told it was in the trunk, but I can't find anything in it that
looks like it, namely, the Query extension method for ISession.
Thanks,
RP
--
You received this message because you are subscribed to the Google Groups
nhusers
/trunk/nhibern...And
for usage you should look Steve Strong Linq Test found
here:http://nhibernate.svn.sourceforge.net/viewvc/nhibernate/trunk/nhibern...
This as I know NHibernate 3 Alpha 1 version.
Hope it helps!
Kornelije Sajler
On Fri, Dec 18, 2009 at 11:40, Ricardo Peres rjpe
Hello,
Has anyone succeeded (or even tried) using the new NHibernate Linq
provider with ASP.NET Dynamic Data? Is anyone interested on this? I
know that the NHContrib one does not work.
Thanks,
RP
--
You received this message because you are subscribed to the Google Groups
nhusers group.
To
-nhibernate-provider.aspx,
and don't forget to send me your feedback.
Thanks,
Ricardo Peres
--
You received this message because you are subscribed to the Google Groups
nhusers group.
To post to this group, send email to nhus...@googlegroups.com.
To unsubscribe from this group, send email
Hello,
Has anyone successfully used SQL Server 2008 encryption with
NHibernate?
The get part for properties is simple, one must provide a formula, but
the set part is trickier. Probably it can only be achieved through
custom user types.
Any ideas?
Thanks,
Ricardo Peres
--
You received
Hello,
Does NHibernate support compilation of queries (HQL, Criteria, LINQ)?
I was looking for ways to speed up the generation of the actual SQL, I
assume it has to be done each time a query is List()ed, or is there a
query cache for HQL, Criteria and LINQ?
Thanks!
Ricardo Peres
--
You
,
RP
On Feb 17, 1:15 pm, Gustavo Ringel gustavo.rin...@gmail.com wrote:
HQL named queries are compiled at the beggining.
Gustavo.
On Wed, Feb 17, 2010 at 2:50 PM, Ricardo Peres rjpe...@gmail.com wrote:
Hello,
Does NHibernate support compilation of queries (HQL, Criteria, LINQ)?
I
Hi, Fabio!
Does this mean that you are advocating entities to have knowledge of
ISession, in the GetLastestVersion method? If not, how would we
implement this?
I am not complaining, just wanted to know your opinion! :-)
Thanks,
RP
On Feb 24, 3:08 am, Fabio Maulo fabioma...@gmail.com wrote:
Never met him, just curiosity!
Thanks!
RP
On Feb 24, 1:19 pm, Fabio Maulo fabioma...@gmail.com wrote:
What ?
GetLastestVersion does not need to know about session, it only need to find
the lastestXYZ inside the collection AllVersion.
Are you working with Chris B ?
2010/2/24 Ricardo Peres
for dealing
with this? HiLo?
Thanks,
Ricardo Peres
--
You received this message because you are subscribed to the Google Groups
nhusers group.
To post to this group, send email to nhus...@googlegroups.com.
To unsubscribe from this group, send email to
nhusers+unsubscr...@googlegroups.com.
For more
Zorgoban,
If you are using async pages or async controls, the request is handled
by a different thread.
RP
On Mar 3, 7:42 am, Zorgoban r...@yahoo.com wrote:
I dont like how this Hanselmann states his personal opinion as fact
without really explaining the backgrounds. He absolutely lost my
Coimbra, Portugal.
On Mar 3, 7:36 pm, Jose A. Salvador Vanaclocha joans...@gmail.com
wrote:
Valencia, Spain
William John Adam Trindade escribi :
Trois-Rivi res,Qu bec, Canada
but, I'm Brazilian!
2010/3/3 Harold Wanyama wanyal...@gmail.com mailto:wanyal...@gmail.com
Iam from
hawkwood,
That happens because of JOINs between two tables, where the right
table has more that one record for the item on the left table.
Have you tried distinct?
var ldossier = (from dos in
session.LinqDossier().Expand(ListeLogicielDossier)
where dos.CodeDossier == 0114
Visar,
In order to fasten startup time, you can serialize the Configuration
object:
Configuration cfg = new Configuration().Configure();
IFormatter serializer = new BinaryFormatter();
using (Stream stream = File.OpenWrite(Configuration.serialized))
{
serializer.Serialize(stream,
Greetings,
For the portuguese-speaking members of this list, I just created a new
mailing list, NHibernate Portugal, for the discussion of NHibernate
issues in portuguese: http://groups.google.com/group/nhpt.
Drop by (or, apareçam!).
Regards,
RP
--
You received this message because you are
Or better:
public class Something
{
protected virtual int myIntValue { get; set; }
public MyEnumeration MyEnumeratedValue
{
get
{
return((MyEnumeration) this.myIntValue);
}
set
{
this.myIntValue = value;
}
}
}
On Aug 3, 8:14 am, Frans Bouma
Amir,
The short answer is: you can't. If the entity is not attached to a
session, there's no way to know its original values, because
NHibernate entities are not self-tracking (Entity Framework 4, among
others, does support this).
What you could do is load an entity by id in another session and
Hello, Jason!
Could you please publish the table of contents?
Thanks!
RP
On Sep 6, 7:51 pm, Jason Dentler jasondent...@gmail.com wrote:
Hi Sal,
For the book, we are targeting October 8th, but that is no absolute
guarantee.
As for NH3, the most recent estimate I've heard is still around
Filip,
This works:
public class SaveListener: DefaultSaveEventListener
{
protected override Object PerformSaveOrUpdate(SaveOrUpdateEvent
@event)
{
if (@event.Entity is Post)
{
Post post = (@event.Entity as Post);
Hello,
I have this question for the NHibernate development team, specially
Fabio. This is something I never saw explained, and I often think of
it, if you have some link at hand, I'd be happy to see it.
How do the Hibernate and NHibernate products relate? That is, apart
from the .NET-specific
Fabio,
Is there a JIRA for subselect/? If not, where can we see more
information?
Thanks,
RP
On Mar 27, 5:42 pm, Fabio Maulo fabioma...@gmail.com wrote:
a view
On Sat, Mar 26, 2011 at 8:30 PM, Krzysztof Kozmic
krzysztof.koz...@gmail.com wrote:
Hey all,
@Fabio - the
wrote:
We have talked about these stuff many times in our dev-list.
I can't find all threads right now.
In-lines some short answers:
On Tue, Mar 29, 2011 at 11:25 AM, Ricardo Peres rjpe...@gmail.com wrote:
Hello,
I have this question for the NHibernate development team, specially
Fabio
Have you tried creating a new session from inside the listener?
using (ISession childSession =
evt.Session.GetSession(EntityMode.Poco))
{
...
}
On Apr 4, 4:15 pm, David Laabs david.la...@createctrl.com wrote:
I looked around a little bit in this forum and in the web...
This seems to be a
Hello,
Does the new mapping by code work with the also new subselect/
feature?
I'm asking this because I can't get it to work, although it doesn't
throw any exception. Also, I can't find a way to specify the
synchronize/ element. It does work well with XML configuration,
though.
Here's my code:
Hi,
With Castle's Dynamic Proxy interceptor
(Castle.DynamicProxy.IInterceptor), we would call the base
implementation inside the Intercept method by calling
invocation.Proceed(). Is there a way to do the same using the new
NHibernate.Proxy.DynamicProxy.IInterceptor? From what I can see, we
must
On Tue, Apr 5, 2011 at 2:39 PM, Ricardo Peres rjpe...@gmail.com wrote:
Hi,
With Castle's Dynamic Proxy interceptor
(Castle.DynamicProxy.IInterceptor), we would call the base
implementation inside the Intercept method by calling
invocation.Proceed(). Is there a way to do the same
Got it:
returnValue = info.TargetMethod.Invoke(this, info.Arguments);
On Apr 5, 8:28 pm, Ricardo Peres rjpe...@gmail.com wrote:
Yes, Fabio, I understand. Here's the situation: like I said, I know
how to do it with Castle Dynamic Proxy. I was thinking that if I can
do this with NHibernate's
, Ricardo Peres rjpe...@gmail.com wrote:
Got it:
returnValue = info.TargetMethod.Invoke(this, info.Arguments);
On Apr 5, 8:28 pm, Ricardo Peres rjpe...@gmail.com wrote:
Yes, Fabio, I understand. Here's the situation: like I said, I know
how to do it with Castle Dynamic Proxy. I
Hello,
Is it already possible to use a custom generator (derived from
TableHiLoGenerator)?
If so, how can I do it? Here's the code I have:
ModelMapper mapper = new ModelMapper();
mapper.ClassCustomer(ca =
{
ca.Table(`CUSTOMER`);
ca.Lazy(false);
ca.Id(x = x.Id, map =
{
return (typeof(Int64));
}
}
Boolean IGeneratorDef.SupportedAsCollectionElementId
{
get
{
return (true);
}
}
#endregion
}
On Apr 7, 11:07 am, Ricardo Peres rjpe
Hello, again!
When retrieving an entity, a collection property is always null, even
when I try to force eager loading:
using (ISession session = factory.OpenSession())
{
Customer c1 = session.GetCustomer(2002L);
Customer c2 = session.CreateQuery(from Customer c join fetch
it without using NH.
Am schrieb Ricardo Peres rjpe...@gmail.com:
Hello, again!
When retrieving an entity, a collection property is always null, even
when I try to force eager loading:
using (ISession session = factory.OpenSession())
{
Customer c1 = session.Get(2002L);
Customer c2
trunk version (as of 12:00 of
today).
Can anyone confirm this is an issue? If so, I will create a JIRA
issue.
Thanks,
RP
On Apr 8, 5:43 am, Ricardo Peres rjpe...@gmail.com wrote:
Why is that? I'm loading it from the DB, NHibernate should create it
itself. In fact, it does, if I don't use lazy
The problem is that they cannot be used: old providers implement
interface NHibernate.Bytecode.IProxyFactoryFactory, while the new code
references NHibernate.ByteCode.IProxyFactoryFactory (notice the casing
in ByteCode).
On Apr 11, 5:26 pm, Fabio Maulo fabioma...@gmail.com wrote:
from
Sorry, my fault. Forget my last message.
On Apr 12, 1:56 pm, Raul Carlomagno rcarloma...@gmail.com wrote:
an official nh mapper by code, nice
what about bytecode provider? is it based on some framework? or
written from scratch
congrats for the new release
--
You received this message
Hello,
How can I do a sum using a LINQ query when the query produces no
elements?
Int32 sum = (from a in session.QueryAnalogicalValue() select
a.Value).Sum();
This fails with a NullReferenceException. The DefaultIfEmpty operator
could probably solve this, but it is not yet implemented.
Does any
Found an old thread about the same problem:
http://groups.google.com/group/nhusers/browse_thread/thread/cb2d05d9d3e57b6b/f5a1e0586c17dac7
and a JIRA ticket: http://216.121.112.228/browse/NHLQ-8.
On Apr 14, 12:50 pm, Ricardo Peres rjpe...@gmail.com wrote:
Hello,
How can I do a sum using a LINQ
Hello, Vahid!
Yes, I know... the problem is that Value is not a nullable type; what
happens is that there are no elements to sum, the same happens when
using SQL: SELECT SUM(Value) FROM AnalogicalValue WHERE 1 = 2
returns NULL.
I solved my problem with:
Object result =
Ooops, forget the text after my signature (RP)!
On Apr 14, 4:53 pm, Ricardo Peres rjpe...@gmail.com wrote:
Hello, Vahid!
Yes, I know... the problem is that Value is not a nullable type; what
happens is that there are no elements to sum, the same happens when
using SQL: SELECT SUM(Value) FROM
project at
http://cid-0450c015fc418de2.office.live.com/self.aspx/.Public/NHTest.zip.
Can someone confirm there is a bug, please?
Thanks,
RP
On Apr 8, 12:03 pm, Ricardo Peres rjpe...@gmail.com wrote:
This is the current status of this issue:
- If the entity is mapped as lazy
Vahid, you're THE man! It worked! I didn't know this technique.
Thanks!
RP
On Apr 14, 5:16 pm, Vahid vahid.nas...@gmail.com wrote:
In my post Value is not a nullable type. So you saw that casting.
--
You received this message because you are subscribed to the Google Groups
nhusers group.
To
You can cast the session.Connection to a OracleConnection and set
these properties.
If you want to do it everytime, subclass OracleDataClientDriver and
add code to an overriden CreateConnection method:
public class MyOracleDataClientDriver: OracleDataClientDriver
{
public override
What about using something like this:
public static ExpressionFuncTEntityType, TPropertyType
PropertyTEntityType, TPropertyType(String propertyName)
{
Type entityType = typeof(TEntityType);
PropertyInfo pi = entityType.GetProperty(propertyName,
BindingFlags.NonPublic |
().Configure().BuildSessionFactory();
ERROR:::=== Could not create the driver from
RR_Web.MyOracleDataClientDriver.
Do I need to add anything else? Is System.Data.IDbConnection correct
for CreateConnection?
Thanks, Robert
On Apr 15, 2:33 pm, Ricardo Peres rjpe...@gmail.com wrote:
You
Or go loquacious:
http://codebetter.com/jameskovacs/2011/01/21/loquacious-configuration-in-nhibernate-3/
On Apr 15, 10:52 pm, Ricardo Peres rjpe...@gmail.com wrote:
You probably have to use the assembly qualified type name, such as
RR_Web.MyOracleDataClientDriver, RR_Web (if RR_Web
Did you try defining your entity as lazy=true?
It must be lazy in order to use lazy properties.
However, I do think there's a bug with Castle bytecode provider, and I
have submitted a JIRA issue: http://216.121.112.228/browse/NH-2646.
RP
On Apr 18, 9:45 am, kor korkl...@yahoo.it wrote:
i have a
and only change the signature of one
proxy-factory method.
On Mon, Apr 18, 2011 at 8:15 AM, Ricardo Peres rjpe...@gmail.com wrote:
Did you try defining your entity as lazy=true?
It must be lazy in order to use lazy properties.
However, I do think there's a bug with Castle bytecode
we can see it.
The embedded provider are passing all NH3.1 tests and more.
On Mon, Apr 18, 2011 at 11:34 AM, Ricardo Peres rjpe...@gmail.com wrote:
Fabio,
The current trunk version has problems with lazy loading as well: not
setting id properties with private setter and setting
You are using the old NHContrib LINQ provider; NHibernate now has
it's own provider in the core (QueryT extension method instead of
LinqT).
I don't know if the old provider supported enums, perhaps someone
else can help with that.
BTW, is the References line commented out?
RP
On Apr 18, 1:05
at 12:12 PM, Ricardo Peres rjpe...@gmail.com wrote:
Yes, I have. I placed a link on all these JIRA issues:
http://cid-0450c015fc418de2.office.live.com/self.aspx/.Public/NHTest.zip.
Like I said, I only want a second opinion, I may be doing something
wrong.
RP
On Apr 18, 4:00 pm, Fabio
for the answer.
I'm not fixed with LINQ, i can run the Query in plain old HQl as well.
But, i have no idea how to write down the query.
Peter
On 18 Apr., 17:15, Ricardo Peres rjpe...@gmail.com wrote:
You are using the old NHContrib LINQ provider; NHibernate now has
it's own
be 'public/protected virtual' or 'protected
internal virtual'
On Mon, Apr 18, 2011 at 1:45 PM, Ricardo Peres rjpe...@gmail.com wrote:
Fabio,
You mean I can't have an id property with a private setter? Is that a
removable limitation imposed by the new proxy generator? If so, I
)
{
p.Lazy(true);
}
});
Translating, I am trying to define a virtual string property as lazy,
inside a lazy class. If I do so, the setter property is not set. If
not, everything works fine.
RP
On Apr 19, 10:42 am, Ricardo Peres rjpe...@gmail.com wrote:
Yes, José
Have you tried
Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
hibernate.cfg.xml);?
On Apr 19, 11:42 am, mynkow myn...@gmail.com wrote:
Hi
I have strange problem. When I call
nhConfigFilePath = hibernate.cfg.xml;
configuration.Configure(nhConfigFilePath);
I
'
On Mon, Apr 18, 2011 at 1:45 PM, Ricardo Peres rjpe...@gmail.com
wrote:
Fabio,
You mean I can't have an id property with a private setter? Is that a
removable limitation imposed by the new proxy generator? If so, I will
create a JIRA issue. To me, it is interesting to not let people
For entity loading, it is easy:
public class PostLoadEventListener : IPostLoadEventListener
{
public void OnPostLoad(PostLoadEvent @event)
{
...
}
}
You can register it through code:
cfg.EventListeners.PostLoadEventListeners = new
IPostLoadEventListener[] { new
I believe this behavior (filtering of joins) is not implemented. There
is, however, a post at the wiki regarding localization techniques:
http://nhforge.org/wikis/howtonh/localization-techniques.aspx
On Apr 26, 10:38 am, Shatl v...@alphacloud.net wrote:
Hi,
How you managed to solve this
A wiki article on localization techniques with NHibernate:
http://nhforge.org/wikis/howtonh/localization-techniques.aspx
On Apr 26, 10:29 am, Shatl v...@alphacloud.net wrote:
Hi,
I'm adding Multilanguage support to my application.
User should see localized data based on language selected in
Is the filter active for the current session?
On Apr 26, 2:19 pm, Shatl v...@alphacloud.net wrote:
Thanks, I tried Ayendee's approach, but I need to store several localizable
properties per entity and using subquery per property seems to be a
performance bottleneck.
I would like to do Linq
Do your long or int fields map to nullable columns in the database?
If so, you must map them as long ? or int ?.
On Apr 26, 3:01 pm, Maximilian Raditya m4h...@gmail.com wrote:
No problem, Peter. I'd like to see if I could offer any help here.
So, let me summarize your situation. Please
Have you heard of nullable types?
Protected nullableField As Nullable(Of DateTime)
On May 4, 8:09 am, foruminar forum.i...@googlemail.com wrote:
Hello there
I'm using VB.NET and MySQL.
I have a datetime attribute which has either a date or null in the
database. In VB.Net the type of the
@object,
You also must take some things in consideration:
- Relations must be entities or simple collections of entities
(IListT, IEnumerableT), not sets (ISetT, HashSetT) or maps
(IDictionary, IDictionaryK, V, HashTable);
- The ID property must be called either ID, or end with ID, for
example,
@Krzysztof:
Shouldn't you be calling the base class' implementation?
public class MySaveOrUpdateEventListener:
DefaultSaveOrUpdateEventListener
{
public override void OnSaveOrUpdate(SaveOrUpdateEvent @event)
{
//do something with the entity
base.OnSaveOrUpdate(@event);
or simple collections of entities.But
Category is an entity, what else can it be? I also tried changing from
ICollection to IList, but still the same error on many side of the
relation.
Vagif
On Mon, May 9, 2011 at 11:23 AM, Ricardo Peres rjpe...@gmail.com wrote:
@object,
You also
is not included in standard NH
release and only exists on the net in blog posts? Shouldn't this be rather
standard extension for NHibernate?
Vagif
On Mon, May 9, 2011 at 1:15 PM, Ricardo Peres rjpe...@gmail.com wrote:
Vagif,
The error is related to having a proxy (Castle) instead
WCF Data Services supports projections (server-side, not client-side,
this you can always do with LINQ to Objects), but you have to enable
them:
public static void InitializeService(DataServiceConfiguration config)
{
config.DataServiceBehavior.MaxProtocolVersion =
Most likely because you have a null column in the database mapped to a
non-nullable property. NHibernate detects that the current value is
different than the loaded value (null) and tries to save the entity.
On May 16, 6:02 pm, Julio Henriquez julio.m.henriq...@gmail.com
wrote:
I'm still stuck
Is your entity marked as lazy?
If not, the only thing that can be lazy loaded (or proxied, if you
prefer) is one to many collections.
On May 20, 6:36 pm, Mohamed Meligy eng.mel...@gmail.com wrote:
I have done some test now.
Yeah, it does load the reference if you set lazy=no-proxy although the
:
cid:image005@01CAF81D.6A076510] http://twitter.com/meligy
http://www.greatplacetowork.com.au/best/best-companies-australia.phphttp://www.readify.net/AboutUs/NewsItem.aspx?id=10
On Sat, May 21, 2011 at 4:07 AM, Ricardo Peres rjpe...@gmail.com wrote:
Is your entity marked as lazy
Hi,
I am having this problem:
- I load a User entity from the DB using session.GetT();
- It loads an additional collection UserGroups containing only one
entity;
- I have an event listener for the SaveOrUpdate event:
cfg.EventListeners.SaveOrUpdateEventListeners =
Forgot to tell: I am using HiLo for ids and, of course, I am not
changing anything on any of the loaded entities. No second level cache
either.
On May 23, 12:43 pm, Ricardo Peres rjpe...@gmail.com wrote:
Hi,
I am having this problem:
- I load a User entity from the DB using session.GetT
1 - 100 of 467 matches
Mail list logo