Hello,
Thanks for the pointers and confirming somethings.
I have gone for similar to Mr. Green and put tables from different
schema's in different namespaces but all within the same
dbix::class::schema.
like so:
__PACKAGE__->load_namespaces
(
result_namespace =>
[
'SchemaA::Result',
'SchemaB::Result',
],
resultset_namespace =>
[
'SchemaA::ResultSet',
'SchemaA::ResultSet',
],
);
Specifying the 'db_schema' does seem to work under Oracle... I tested in
against Postgres and that worked, but switching to Oracle it seemed to
result in no output from Schema::Loader (I will investigate further and
file a bug report)
I was going to change the ->table("blah") call in my Result file, but
reluctantly as this would break the autogeneration'ness as I would be
editting above the "DO NOT MODIFY THIS OR ANYTHING ABOVE" line....
... but then I twigged that I could just specify for a second time the
->table("blah.blah") line ... meaning I could still use ::Schema::Loader
to auto-generate most of my Result files.
sadly I have to manually put in all the cross-schema relationships, buts
I think I can cope with that. ;)
You might wonder why I seem to be so desperate to hang onto the
autogeneration of the Result files... well as far as I can tell it seems
to be a free for all on the database with about 10+ developers changing
stuff.. so it helps my dbix stuff keep upto speed.
Thanks again for the help, I really appreciate it.
-Ben
On 11/10/10 23:06, Dan Horne wrote:
The problem with cross-schema relationships is that Oracle users
typically have access to too much information that is irrelevant to
their application, and reverse engineering everything would create too
many irrelevant classes....
On 12 October 2010 05:02, Benjamin Martin
<[email protected]
<mailto:[email protected]>> wrote:
Hello All,
I am using ::Schema::Loader to build my Result files from an
Oracle DB.
I am new to Oracle, but from what I got told it would seem a
'user' is a 'schema' in Oracle.
I have some cross-schema relationships in the DB, but schema
loader is not building these into my Result files... I guess
because I connect as a certain user/schema.
I was wondering if anyone knew if it was possible (or not) to get
::Schema::Loader to create my cross-schema relationships? ... or
do have to add these all manually.
Thanks for any help you can offer.
tar,
-Ben
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class <http://irc.perl.org#dbix-class>
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive:
http://www.grokbase.com/group/[email protected]
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]