Since NH 2.0.1 there is no automatic flush, so you should commit a
transaction or use flush never and flush by your self.During save or update
you are getting because you may be using a strategy like identity which
needs a flush to get the ID, but this is more an inevitable problem than a
feature.
Thanks.
--
Ian
On Tue, Jul 21, 2009 at 1:59 PM, Fabio Maulo fabioma...@gmail.com wrote:
session.Refreshor
the tag generated of a property
2009/7/21 ian ian.esca...@gmail.com
I have a trigger to update the quantity of the Item table. Let's say
ItemReceipt will trigger plus (+) in item
id name=Id column=Id unsaved-value=0
generator class=native/
/id
Is is not the column=Id ?
Kind regards
On 26 jul, 21:52, James Gregory jagregory@gmail.com wrote:
AFAIK you can't set the primary key name. Foreign keys yes, primary no.
On Sun, Jul 26, 2009 at 8:49 PM, Jan
--~--~-~--~~~---~--~~
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
nhusers+unsubscr...@googlegroups.com
For
Hi
1) When we use native generator, in code it will first check if the
dialect can provide identity values and then sequences, and as a
failback it uses table-hilo.
I think most people prefer the use of sequences over identities if the
database supports it.
2) Could we provide a nativehilo
I also bumped into this problem (non-case-sensitive String.Contains() is a
really common requirement), and still looking for a solution for this..
which apparently still produces the same exception in the recent release of
NH-Linq. Any idea?
Thanks
On Tue, May 5, 2009 at 1:24 PM, Bryan Murphy
var query = from e in db.Employees
where e.FirstName.Contains(a)
select e;
this works, regarding to string.contains.
Tuna Toksöz
Eternal sunshine of the open source mind.
http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
can you retry your query like this:
string emailAddress=his.EmailAddress.ToLower();
from u in session.LinqUser()
where u.EmailAddress.ToLower() == emailAddress
select u;
Tuna Toksöz
Eternal sunshine of the open source mind.
http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
Good day!
I've just started to use NHibernate in my applications, but I'm a little bit
having a problem trying to create the mapping files for my Customer-Address
relationship. I only need to have one Address for one Customer in my object
model, and in my database, I would be having a Customers
Good day sir!
I've just started to use NHibernate in my applications, but I'm a
little bit having a problem trying to create the mapping files for my
Customer-Address association. I only need to have one Address for one
Customer in my object model, but in my database, I would be having a
I thought that would generate title LIKE'%a%'? (instead of LOWER(title) LIKE
'%a%')
On Mon, Jul 27, 2009 at 5:33 PM, Tuna Toksoz tehl...@gmail.com wrote:
var query = from e in db.Employees
where e.FirstName.Contains(a)
select e;
this works,
Sorry, no joy.. Still exact same exception..
Cheers
On Mon, Jul 27, 2009 at 5:35 PM, Tuna Toksoz tehl...@gmail.com wrote:
can you retry your query like this:
string emailAddress=his.EmailAddress.ToLower();
from u in session.LinqUser()
where u.EmailAddress.ToLower() == emailAddress
select
Quite weirdly, this doesnt work too:
u.EmailAddress.Equals(emailAddress,
StringComparison.CurrentCultureIgnoreCase))
.. even though StringComparison.CurrentCultureIgnoreCase works perfectly
with both StartsWith() and EndsWith() .
And unfortunately, String.Contains() doesn't have overload that
However, since there is no valid reason to make DelayedEnumerator public, i
would opt to return arrays instead of ienumerable instances
in your datacontracts, and just do a .ToArray() when you're assembling your
CatalogsForSite object. Your DataContracts shouldn't
mention anything
Details are in here:
http://stackoverflow.com/questions/1186623/nhibernate-connection-string-how-to-specify-port-number-and-server-instance
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
nhusers group.
To
Thanks Nexus!!
I know it can be handeled in code as I can create two entities where I
can fetch values and can create a common entity out of it, but it
require me to define multiple entities and also I have to define
relations etc.
What I was wondering was if I have some thing like SQL where
You could use projections, or maybe map the two entities by a
discriminator
greetings
On 27 jul, 11:50, Sachin sachingupta1...@gmail.com wrote:
Thanks Nexus!!
I know it can be handeled in code as I can create two entities where I
can fetch values and can create a common entity out of it,
Hello,
I have a table CustomerTypeOfWork :
- Id
- CustomerId (FK)
- TypeOfWorkId (FK)
- HourByWeek
A table Scheduled :
- Id
- CustomerTypeOfWork (FK)
- HourByWeek
I'd like for one customer, get for each TypeOfWork he asked the total
of HourByWeek scheduled.
A customerTypeOfwork can be
Hi,
I've been having some problems getting the right schema generated.
Here's an example class (stripped versions):
public class User
{
public virtual Guid Id { get; private set; }
public virtual Names Names
{
2009/7/27 Nexus tommar...@gmail.com
id name=Id column=Id unsaved-value=0
generator class=native/
/id
Is is not the column=Id ?
No, not the column name, the name of the Primary Key (PK_Something)
On 26 jul, 21:52, James Gregory jagregory@gmail.com wrote:
AFAIK you can't
Are you sure that this one works with ADO.NET SQL COnnection? If yes, will
work with NH too
Tuna Toksöz
Eternal sunshine of the open source mind.
http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike
On Mon, Jul 27, 2009 at 3:57 PM, Jeffrey mr.kaw...@gmail.com
Hi,
I have seen that a lot of people are escaping Expression.Like.
Isn't there a generic way of doing LIKE avoiding the escaping?
Why? Because of set of characters to that should be vary from Db to DB and
thus we have to look into Factory/Config to make sure we escape correctly.
Is there
Have you tried specifying the columns explicitly? Then applying the length
attribute to those.
On Mon, Jul 27, 2009 at 3:44 PM, mikoro miko...@gmail.com wrote:
Hi,
I've been having some problems getting the right schema generated.
Here's an example class (stripped versions):
public
Hello open people,
I think I founded a bug in NHibernate 2.1.
Before reading that message and throwing me stones, please know that I
founded it at work and I'm pretty tired and lazy now. So if I am not
giving enough details, please don't kill me! I prefered posting
something before forgetting
Can someone help me with it ?
i have an class (City) that uses a System.Guid (GUID.COMB) identifyer.
and when i'm trying to count that rows, that exception was thrown
Server: Msg 409, Level 16, State 2, Line 4
The count aggregate operation cannot take a uniqueidentifier data type as an
argument.
Do you mean within the normal NHibernate mapping file? Yes it works.
And I can give the constraints with the validator to simple properties
of a class. But if I have a subclass, and if I map it with the
validator,
constraints won't be added to the schema. I have mapped the subclass
as a component
I see there is a test case for IUserCollectionType in the source.
I've been looking for an example of creating a generic custom
collection using that interface but haven't had much luck.
I need to create set type that supports INotifyCollectionChanged.
I should have added that is needs to support lazy loading.
On Jul 27, 3:49 pm, darren sarcas...@gmail.com wrote:
I see there is a test case for IUserCollectionType in the source.
I've been looking for an example of creating a generic custom
collection using that interface but haven't had much
I have an error in deleting a master/detail relationship. I have a
PurchaseOrder class and a PurchaseOrderItem class. These are the mapping.
?xml version=1.0 encoding=utf-8 ?
hibernate-mapping xmlns=urn:nhibernate-mapping-2.2
namespace=Bogetz.Elephant.Model assembly=elephant
class
Hi Gustavo,
Ok. Thanks.
I'll wrap things in a transaction.
Cheers.
2009/7/27 Gustavo Ringel gustavo.rin...@gmail.com
Since NH 2.0.1 there is no automatic flush, so you should commit a
transaction or use flush never and flush by your self. During save or
update you are getting because you may
30 matches
Mail list logo