incubator-empire-db-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele <doeb...@esteam.de>
Subject re: Bean handling in 1:n relationships or joins
Date Wed, 07 Dec 2011 17:41:25 GMT
Hi Jens,

remember that Empire-db is not an OR-Mapper and it does nothing automatically.
In exchange it gives you more control over what, when and how database operations are performed.

Even though beans can be used as data containers, they will not provide the same level of
functinality than a DBRecord does. 

Again I recommend to take a look at our examples empire-db-example-basic and empire-db-example-advanced.
Regards

Rainer


> from: Jens Breitenstein [mailto:mailinglist@j-b-s.de]
> to: empire-db-user@incubator.apache.org
> re: Bean handling in 1:n relationships or joins
> 
> Hi all!
> 
> I have to admit I am pretty new to empire-db but feel quite confortable
> with it...
> Finally I got the Bean mapping working for single tables and I now get
> stuck in how to handle joins correctly...
> 
> Assume a simple relationship between a document and a user (where the
> users-pk is part of the documents as fk to indicate a relation
> "document
> is owned by user").
> Using the getBeanList method it seems only possible to convert a "root"
> element (in my case the document) but not any referenced element
> automatically?
> If I am wrong can someone explain me how I can retrieve a "document"
> having a fully instantiated "user" element instead of just an FK?
> Or do I have to read the user record manually and the bean handling
> does
> not support joined objects at all?
> 
> thanks in advance
> 
> Jens


Mime
View raw message