Hi there!

I'm quite a beginner with FLuentNhibernate, but it's exactly the tool
I was looking for quite a while :) Anyway, I'm working on a project
where I have products that have a specific information, a temperature
range in which they should stay to stay fresh. So I built something
like:

public struct TemperatureRange {
    public int From { get; set; }
    public int To { get; set; }
}
---
And then, in the Class of the Product, I added this:
[snip]
public virtual TemperatureRange stockTempereature { get; set; }
[/snip]

And in the Mapping of the Product:
[snip]
Map (x => x.stockTemperature);
[/snip]

Now, of course I get an exception from FluentNhibernate stating that
it's not possible to convert to the type I wanted. Actually I could
just put the two values in the Product-class, but I'd prefer a struct
(would be more readable and more logical, at least for me). I also
tried this, but without luck (again an exception):

Component(x => x.stockTemperature, m =>
            {
                m.Map(x => x.from);
                m.Map(x => x.to);
            })

Would be great if somebody could give me a hand, as I wasn't able to
find any info on this on the net.

Thanks :)

Lukas


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to