Alright, so I've searched all over the web (this list doesn't appear to
be archived either), so here I am ;-).
I am finally getting into using Hibernate on a few projects and have
run across something that I'm sure how it would be handled. I have one
table that uses itself as a collection.
Bas
Theres nothing particularly special about this. Just map it as you would
any other association.
The only problem is your -1, which breaks referential integrity of the
whole table! just switch to using an SQL null.
[EMAIL PROTECTED] wrote:
Alright, so I've searched all over the web (this list d
On Tuesday, September 9, 2003, at 07:07 PM, Gavin King wrote:
Theres nothing particularly special about this. Just map it as you
would any other association.
The only problem is your -1, which breaks referential integrity of the
whole table! just switch to using an SQL null.
Ok, I guess this is
Got this working!
Now I have another question with regards to collections in general.
I tried to do this:
Set subCategories;
public void setSubCategories()
public Set getSubCategories()
public void addSubCategory()
public void removeSubCategory()
in add and remove I refer to the collection subCat
Nope, the set/get are required.
Warner Onstine wrote:
Got this working!
Now I have another question with regards to collections in general.
I tried to do this:
Set subCategories;
public void setSubCategories()
public Set getSubCategories()
public void addSubCategory()
public void removeSubCateg
It definitely works. I have many such methods like
what you mentioned.
Post your method implementation and exception here.
Let me have a look.
jason
--- Warner Onstine <[EMAIL PROTECTED]> wrote:
> Got this working!
>
> Now I have another question with regards to
> collections in general.
>
>
Ok, For some reason my Unit tests were passing when I wasn't using
hibernate to persist (even though they shouldn't have), I found my
problem (I wasn't initializing the internal Set before trying to use it
- doh!). So, this is now working, but I am experiencing another problem.
Here's my layout