Then, I think you will can split your problem:

1) you need save and reload an objects list (and the Count of your list)
2) you need a property (only the get) capable of build your list with
null values at end of it.

Nelo.

On Thu, Sep 11, 2008 at 1:59 PM, srf <[EMAIL PROTECTED]> wrote:
>
> ya, there is a lot of debate about the value in put null entries in
> lists and dictionaries but they have that requirement but for whatever
> reason they want that so Im just seeing whats possible. In the
> relational world it doesnt make much sense but they are just thinking
> more of the state of an object, ie, they save it with 5 entries and
> they get that  exactly back when its reloaded regardless if some of
> the entries are null.
>
>
> scott
>
> On Sep 11, 9:05 am, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
>> Show me the DB model that can supports this.
>> Your requirement doesn't make a lot of sense.
>>
>> On Thu, Sep 11, 2008 at 6:03 PM, srf <[EMAIL PROTECTED]> wrote:
>>
>> > actually we found some interesting side effects using an index, with
>> > an index we found it would restore the null entries since if there is
>> > a value for index 1,3,5 , it will put in a null entry for index 2,4 .
>> > the problem is if there is a null in index 6 then it wont put in a
>> > null since it doesnt see any breaks in the indexing. Using
>> > dictionaries though is different, it doesn't return null entries any
>> > way you do it. Unfortunately these inconsistencies drive the
>> > developers crazy. If they have 5 values in a collection  then they
>> > expect 5 back.
>>
>> > scott
>>
>> > On Sep 11, 8:54 am, "Nelo Pauselli" <[EMAIL PROTECTED]> wrote:
>> > > Are you using a bag?... have you try using a map or a list?...
>>
>> > > If I understand your problem:
>> > > To using null values in a list of entities, your key shouldn't be
>> > > related with the object. You need a index.
>>
>> > > Nelo.
>>
>> > > On Wed, Sep 10, 2008 at 7:39 PM, Roger Kratz <[EMAIL PROTECTED]>
>> > wrote:
>> > > > Is this really possible in hibernate? How can the row in the child
>> > table be null but still have a fk to the parent table?
>>
>> > > > One way of solving it would be to do it yourself in your domain.
>> > Keep/Map the number 5 (in your example) in the parent object/table, check
>> > how many entries there are in the list and add the "lack of entries" with
>> > null before returning the list to the consumer. Ugly - but that would work 
>> > I
>> > guess.
>>
>> > > > /Roger
>>
>> > > > ________________________________
>>
>> > > > Från: [email protected] genom srf
>> > > > Skickat: to 2008-09-11 00:15
>> > > > Till: nhusers
>> > > > Ämne: [nhusers] null entries in lists and dictionaries
>>
>> > > > we need to be able to save null entries in a list and dictionaries but
>> > > > we found that nhibernate would just throw away the null values but we
>> > > > need them for consistency , ie , if I save a list with 5 entries and 2
>> > > > of them are nulls then I would expect to get back 5 entries. Does
>> > > > anyone know if this is an issue or how we can handle this case. On the
>> > > > java side hibernate supports it so I was wondering if this is
>> > > > something that is supported in nhibernate.
>>
>> > > > thanks
>>
>> > > > scott
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to