[jboss-user] [JBoss Seam] - Weird entity behavior

swd847 do-not-reply at jboss.com
Tue Oct 9 22:39:21 EDT 2007


I have some entities, call them Portfolio and Account

Account is the root of a single table inheritance heirachy.

Portfolio has a OneToMany bidirectional relationship to a Account, mapped using a foreign key in Account.

if i call portfolio.getAccounts() the accounts do not get initialized properly. All the primitive properties of Account are initialized but not relationships to entities that have already been loaded (or something like this, I am not 100% sure). 

So if I take one of the Account's that I got using portfolio.getAccounts() and call account.getPortfolio() it will return null. Same with other entities that are loaded (e.g. Acccount has a List of AccountTransactions, I can call account.getAccountTransactions() no problems but not accountTransaction.getAccount()).

Does anyone know what could be causing this? There is nothing special about the entities and apart from this one problem everything else works fine.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093252#4093252

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093252



More information about the jboss-user mailing list